edfh-data
Python library for the E:D Faction Hub application backend data services:
- EDDN listener service, receives messages from the EDDN stream and publishes them to a RabbitMQ exchange.
- EDDN handler service, polls message from a RabbitMQ queue, parses them and stores the relevant info in a relational database.
Requirements
- Python 3.13 available in the sytem path.
- Running RabbitMQ and Postgres instances (the included
docker-compose.yamlfile can set them up for development).
Configuration
The following configuration variables are defined are defined as environment variables, or, for local development, specified in a .env configuration file:
DB_HOST=localhost
DB_PORT=5432 # Default postgres port. Change if different DB than postgres is used.
DB_NAME=edfh
DB_ROOT_PASSWD=<db_root_password>
DB_SA_DIALECT=postgresql+psycopg # SQLAlchemy dialect. Change if different DB than postgres is used.
DB_USER=dbuser
DB_PASSWD=<db_password>
RMQ_USER=rmquser
RMQ_PASSWD=<rabbitmq_password>
RMQ_HOST=localhost
RMQ_HANDLER_PREFETCH=10
EDFH_EDDN_MESSAGE_MAX_AGE_DAYS=365
Usage
Install the package with the eddn extra:
python -m pip install edfh-data[eddn]
Launch the EDDN message handler service with:
eddn-handle
Launch the EDDN listener service with:
eddn-listen
Development
Python environment
Create a virtual environment using Python 3.13:
python3.13 -m venv .venv --prompt edfh-data --upgrade-deps
source .venv/bin/activate
Install the package in development mode along with the development dependencies:
python -m pip install -e .[dev]
Install pre-commit hooks:
pre-commit install
Database service
Migrate the database with:
alembic upgrade head
Generate a new revision:
alembic revision --autogenerate -m "Revision message"
Metadata
Release files for edfh-data 0.20.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| edfh_data-0.20.4.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edfh_data-0.20.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.7 kB
Release files / edfh_data-0.20.4.tar.gz
| Download URL | edfh_data-0.20.4.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61c514b1731344e8db6302cea2d1b810de422c595b5e55925c8d21680e457bc2
|
|
BLAKE2b-256 checksum How to use checksums |
3a66f48ef8955f5513e8fe9e3d2ab52d3071e54769d14074bdee7030a9b53e0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.15
|
Release files / edfh_data-0.20.4-py3-none-any.whl
| Download URL | edfh_data-0.20.4-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2888078211ece93003abc6dd42732a7f6ed59a95886dff1620306d39c8d7e82
|
|
BLAKE2b-256 checksum How to use checksums |
4fcfe31ce3c885291438cc1fd72acf2afa99f1e75c42fa07704d0987fbedb7fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.15
|