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.3

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.3
File Size Uploaded
edfh_data-0.20.3.tar.gz 17.1 kB Details

Built distribution (wheel)

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

Total release size: 34.1 kB

Release files / edfh_data-0.20.3.tar.gz

Download URL edfh_data-0.20.3.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2383e3143338f2c7c539cd27cda97cfb6280331e7b71240dd393a2e68815078a
BLAKE2b-256 checksum
How to use checksums
6abf9013f9851d6edcbcbdd8edfa48971c6710b4d3125d6d82ccbd2fca057628
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.3-py3-none-any.whl

Download URL edfh_data-0.20.3-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab762c9f9de4e3006adca08a0f7b9cf67815005bd78b5526606529b468ad4bda
BLAKE2b-256 checksum
How to use checksums
5cea8aa595c6df3f1634d3433c6e090e54f42309b680acdb87c425c30678cee8
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