The backend & REST API for the CSSS website. Anything the website frontend does that stores or retrieves information goes through this api. The services this website provides are the following:
- authentication
- (pending) information about executives
- (pending) personalized exams from our bank
- (pending) and more!
See the csss-backend wiki for details on how to run the REST API locally on your own machine.
If you're planning to read through the source code, please check out this project's naming conventions.
- Install Python 3.13, git, and (optionally) Docker
- Clone this repository
- Create and activate a virtual environment for this project. This has been tested with
pipanduv - Install developer dependencies
# Install main dependencies
pip install . # or: uv sync
# Install with dev dependencies
pip install ".[dev]" # or: uv sync --extra dev
# Install with test dependencies
pip install ".[test]" # or: uv sync --extra test
# Install with all dependencies
pip install ".[dev, test]" # or: uv sync --all-extras- Follow the database setup instructions on the wiki. The recommended way is to do it through Docker, but both should work.
- You will need to set the following environment variables set
DB_PORT=5444 # If you're using Docker
ENVIRONMENT=dev # Set this to `test` if you want to use the test database insteadYou can also create a .env file and set those in there. See .env.example for more information.
config/configuration files for the server machinesrc/alembicdatabase migrationsauth/controlling authentication and sessionscandidates/management of those who run in large electionselections/mangement of current elections & past electionsevent/management of eventsnominees/management of nominees to large electionsofficers/management of officer information and termstranslink/management of TransLink REST API
test/unit and integration tests
We use ruff as our linter, which you can run with ruff check --fix. If you use a different version, it may be inconsistent with our CI checks.
We use pyright/basedpyright for typechecking. Language services have been left enabled and will be changed if it becomes an issue.