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. 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.5.1.tar.gz (31.0 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.5.1-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for polars_hist_db-0.5.1.tar.gz
Algorithm Hash digest
SHA256 102ef75b97aabcd21942fa4705a52a04c20acdc848848f8766e11adbb7ef0bd6
MD5 5be90e9b6cb6ceb2837d8245b1a5ecb1
BLAKE2b-256 debf50a61d828591796164a0d4bef8c2ecad98a6acaa7bb73981149a0f58ad59

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for polars_hist_db-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d20ba8af6d8f6c6c4e436fabc3601d0ddced6fc945e7d23e66e6e08314e47152
MD5 05e69a32ff5c4e30552db403655b1e2a
BLAKE2b-256 b74f9b81a6ca506ce2744108adcf592d9226ddfded1e9ab9b1ade92a2751794f

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