Skip to main content

Python library for the E:D Faction Hub application backend data services

Project description

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 MariaDB 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_USER=dbuser
DB_PASSWD=<db_password>
DB_HOST=localhost
DB_PORT=3306
DB_NAME=fgs_infra_db
RMQ_USER=rmquser
RMQ_PASSWD=<rabbitmq_password>
RMQ_HOST=localhost
RMQ_HANDLER_PREFETCH=10

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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edfh_data-0.6.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edfh_data-0.6.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file edfh_data-0.6.0.tar.gz.

File metadata

  • Download URL: edfh_data-0.6.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for edfh_data-0.6.0.tar.gz
Algorithm Hash digest
SHA256 22f655f6c46e13c0ab3b6a274dc9bd072cec44b1ebd0a9918563ebfec9ea767d
MD5 f08cbaae0e0fdff7d88e7a10f5a4603e
BLAKE2b-256 ebfe0d28cdb3bfc65c8dd6ac35712e74bd92f4f1d8d715f61e1b22ece4f1677e

See more details on using hashes here.

File details

Details for the file edfh_data-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: edfh_data-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for edfh_data-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67da28c48673da042252d81b2c15191be2976ef05401b3e1519875daa675e324
MD5 d0bc7fddd4e531aaa71f2bca5006d888
BLAKE2b-256 b29aed5e035bc54a8aac81c8602430a4121cbec1c3eddeb929d9b1a25d030241

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page