fits2db: A cli tool to ingest fits files into an sql db
| Testing | |
| Package | |
| Docs | Find Here |
This is a cli tool to extract table data from a fits file and write it down in a database.
Supported databases
| Database | Supported |
|---|---|
| MySql & MariaDB | YES |
| DuckDB | In progress |
| Postgres | under validation |
Installation
For installation up to version 0.0.3 can be installed with pip
pip install fits2db
For newer verions use the git repository
pip install git+https://github.com/pmodwrc/fits2db.git@main
check if you got the right version with
fits2db --version
To init a config file run
fits2db init
In the config.yml file you now can change the variables needed.
Fill in the database credentials:
database:
type: mysql
host: localhost
user: user
password: password
db_name: test_db
port: 3306
and add some paths for your fits files
fits_files:
paths:
- path/to_your_file/2021-07-07_L1a.fits
- path_to_your_folder
# Delete rows from above listed files from tables which are not listed below
delete_rows_from_missing_tables: True
tables:
- name: HOUSEKEEPING
date_column: timestamp # This column will be interpreted as a datetime variable
- name: OTHER_TABLE # If no table name given it will use the orignal name
Build your database from config file
fits2db build <path_to_config_yaml>
This will create the following tables:
| Table | Description |
|---|---|
| FITS2DB_META | Contain meta information about loaded files |
| FITS2DB_TABLE_META | Contains info about all loaded tables from the files |
| HOUSEKEEPING | Contains the data of your fits files tables HOUSEKEEPING merged |
| HOUSEKEEPING_META | Contains the Column information from the fits files |
| OTHER_TABLE | Contains the data of your fits files tables HOUSEKEEPING merged |
| OTHER_TABLE_META | Contains the Column information from the fits files |
To add new Files to a existing database use
fits2db update <path_to_config_yaml>
Files which are not yet in the database are added. Already exisitng files are only updated, if their last change time is newer than the already existing one. To force the update of already uploaded files use
fits2db update <path_to_config_yaml> -f
Metadata
Release files for fits2db 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fits2db-0.1.0.tar.gz | 43.2 kB | Without provenance | Details for fits2db-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fits2db-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fits2db-0.1.0-py3-none-any.whl |
Total release size: 96.7 kB
Release files / fits2db-0.1.0.tar.gz
| Download URL | fits2db-0.1.0.tar.gz |
|---|---|
| Size | 43.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be4bb926cc55591a1be2702fe3f1cb462350a45472759a2205f42144db6ed765
|
|
BLAKE2b-256 checksum How to use checksums |
bd6f03b1b79314eb5076a029739e1d06f95bea89b603ebd676ec5d59d6d3c1cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / fits2db-0.1.0-py3-none-any.whl
| Download URL | fits2db-0.1.0-py3-none-any.whl |
|---|---|
| Size | 53.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed6c1fa8b1a04595f74456e8a61592534d1bc4284ff28866d5ab4077a296e205
|
|
BLAKE2b-256 checksum How to use checksums |
c1d4136b39f330c7e8e27df96b45b19ceb2bb064cc3672422a44a5cd40d3145f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for fits2db 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.