Python 3.11 required.
Setup the environment:
python3 -mvenv .venv
source .venv/bin/activate
pip install -e .[dev]Install the pre-commit hooks:
pre-commit install --install-hooksThe linting is managed by pre-commit, but you can run it with:
pre-commit run --all-filesWe use python-dotenv, if a .env file is present it will be loaded.
You can copy the .env.template as .env, and complete it to have a quick env setup done.
Other configuration values may be overridden, the .env file is not git-tracked in this repo so don't hesitate to twist the configuration when you want to test things.
Then run the development server:
uvicorn app.main:app --reloadBuild image
docker build . -t sharinghub-server:latest --build-arg VERSION=$(git rev-parse --short HEAD)Use it
docker run --rm --env-file .env -p 8000:8000 --name sharinghub-server sharinghub-server:latestYou can check the API docs at localhost:8000/api/docs.
Please check CONFIGURATION.md.
Copyright 2024 CS GROUP - France
SharingHub Server is an open source software, distributed under the Apache License 2.0. See the LICENSE file for more information.