The official Python Daemon of Cryptic
The documentation can be found on GitHub Pages.
If you want to build the documentation yourself, use the docs script:
pipenv sync --dev
pipenv run docs
Note that you need to have Docker installed for this!
- Python >=3.9
- Pipenv
- Black
- Git
- Docker and docker-compose (recommended)
- PyCharm Community/Professional (recommended)
- An instance of the Cryptic Java Server (recommended)
git clone git@github.com:cryptic-game/python-daemon.git
git clone https://github.com/cryptic-game/python-daemon.git
Once you have cloned the repository, you need to create a virtual environment and install the dependencies using the following command:
pipenv sync --dev
To set the required environment variables it is necessary to create a file named (exactly) .env in the root directory (there is a template for this file in daemon.env).
Project
├── daemon
│ ├── endpoints
│ │ ├── __init__.py
│ │ └── <endpoint collection>.py
│ ├── exceptions
│ │ ├── api_exception.py
│ │ └── <endpoint collection>.py
│ ├── models
│ │ └── <endpoint collection>.py
│ └── schemas
│ ├── <endpoint collection>.py
│ ├── daemon.py
│ └── ok.py
└── tests
├── endpoints
│ ├── __init__.py
│ └── test_<endpoint collection>.py
└── test_<...>.py
- Open PyCharm and go to
Settings➔Project: python-daemon➔Python Interpreter - Open the menu
Python Interpreterand click onShow All... - Click on the plus symbol
- Click on
Pipenv Environment - Select
Python 3.9asBase interpreter - Confirm with
OK - Change the working directory to root path ➔
Edit Configurations➔Working directory
To run the Python Daemon yourself, use the daemon script:
pipenv run daemon
Before committing your changes, please check that all unit tests are passing, reformat your code using black and run the linter:
pipenv run test
pipenv run black
pipenv run flake8
