- OpenAI API account: https://platform.openai.com/
- Pinecone account: https://www.pinecone.io/
Install rtx: https://github.com/jdx/rtx
- when you cd to the project directory, run
rtx install
to install the correct version of python, poetry, and pipx
Install dependencies using poetry: poetry install
Install nox: poetry run pipx install nox && poetry run pipx inject nox nox-poetry
Install pre-commit as a git hook: poetry run pre-commit install
create a .env
file with the following variables:
OPENAI_API_KEY=your_openai_api_key (found on API keys page)
PINECONE_API_KEY=your_pinecone_api_key (found on API keys page)
PINECONE_ENV=your_pinecone_environment_name (found on API keys page)
UPSTASH_REDIS_REST_URL=your upstash redis url
UPSTASH_REDIS_REST_TOKEN=your upstash redis token
Activate the poetry virtual environment: poetry shell
Periodically add the files you are working on to git and run the following to make sure the code is high quality:
pre-commit run -a
mypy server tests
pytest .
uvicorn server.main:app --reload
Contributions are very welcome. To learn more, see the Contributor Guide.
Distributed under the terms of the MIT license, Server is free and open source software.
If you encounter any problems, please file an issue along with a detailed description.
This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.