Skip to main content

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.yaml file 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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edfh-data 0.20.2
File Size Uploaded
edfh_data-0.20.2.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edfh-data 0.20.2
File Interpreter ABI Platform
edfh_data-0.20.2-py3-none-any.whl Python 3 none any Details

Total release size: 34.2 kB

Release files / edfh_data-0.20.2.tar.gz

Download URL edfh_data-0.20.2.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de1955b8b3e0f9a634a808a255cf784e59a47fdd3ee6e3dccd8aacb5e32aab3d
BLAKE2b-256 checksum
How to use checksums
d203197487837e088d5ca5586d975c1ae9f259ac175a0942cc4a589cd9c15217
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.2-py3-none-any.whl

Download URL edfh_data-0.20.2-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f57b07a2a23862cc7fa90a1ba6359027526d701a3182cb435923cf162f10a5ac
BLAKE2b-256 checksum
How to use checksums
e3c9400e225482baaf8917a12b74924645510d9fe781fc9c8889d8d3e26926d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page