Installation#
This section explains how to install RESTAlchemy and its typical dependencies.
Requirements#
- A supported version of CPython (see RESTAlchemy on PyPI for exact versions).
- A virtual environment is strongly recommended.
- For SQL storage examples:
- A running database (e.g. MySQL or PostgreSQL).
- Matching Python drivers (e.g.
mysql-connector-python,psycopg).
Install RESTAlchemy#
Create and activate a virtual environment (optional but recommended):
Install the library from PyPI:
To work with all examples in this repository, also install extra dependencies from requirements.txt (in the repository root):
Verifying the installation#
Run Python and import RESTAlchemy:
If this prints a version string without errors, the core installation works.
Optional: database drivers#
If you plan to use SQL storage:
- MySQL:
- Install a MySQL driver, for example:
- PostgreSQL:
- Install a PostgreSQL driver, for example:
Make sure the connection URLs you use in your code match the drivers and database you have installed.