Skip to main content

dsv --> dataframe <--> bitemporal-tables

Project description

polars-hist-db

This library is for scraping data from CSV style files, temporally, into MariaDB.

Main features are:

  • Uploading data from strongly-typed Polars DataFrames.
  • Querying data into Polars DataFrames, with column types inferred from the database schema.
  • A scrape specification that:
    • Defines pipelines for typing, enriching, and normalizing data before uploading.
    • Allows construction of the 'as-of' time from file attributes or as a function of the input columns.
    • Catalogs the history of scrape inputs to prevent duplication.
    • Supports per-file transactional scraping (either the processing for a file succeeds, or the transaction is rolled back).

Development Setup

  1. Install NATS server
brew install nats-server
  1. Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
  1. Install development dependencies:
poetry install --with dev
  1. Run tests:
poetry run pytest
  1. Make docs. The documentation will be generated in the docs/_build/html directory:
cd docs && poetry run make html

Code Style

This project follows the following code style guidelines:

  • Use type hints for all function parameters and return values
  • Follow PEP 8 style guide
  • Use Google-style docstrings
  • Keep functions focused and single-purpose
  • Write comprehensive tests for new features

Run make check to check the code style.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the terms specified in the LICENSE file.

References

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

polars_hist_db-0.6.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

polars_hist_db-0.6.0-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_hist_db-0.6.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for polars_hist_db-0.6.0.tar.gz
Algorithm Hash digest
SHA256 81bcfd0033818600c4dba94ba1d53f0a7c15500f754a42167ad5ed69e7dd107f
MD5 f8534931e0fea12fd7d8882f84f09cd6
BLAKE2b-256 78383d218b0a05dbba962d551fa702afe6b49d4b73ab300fd26d6593531f0c66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: polars_hist_db-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 52.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for polars_hist_db-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78bfae3c48b6465ce7452d2cb5901ae7155ce161f913162e5caf8200ef5bd4d8
MD5 1aafd2d737903f8ca12ee2220eccfe6c
BLAKE2b-256 1cb6503f98fb21e7fe59aa5d982278705a4b1d37019c534a217f50fd88491b7c

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