Skip to main content

A cli tool to load and manage tables from fits files into a sql database

Project description

fits2db


fits2db: A cli tool to ingest fits files into an sql db

Testing CI - Test codecov linting: pylint
Package PyPI Latest Release PyPI Downloads
Docs CI - 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 you can use pip

pip install fits2db

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
tables:
    - name: HOUSEKEEPING
      target_table: RAW_HOUSEKEEPING # This will be the table_name in the db
    - 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

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

fits2db-0.0.3.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

fits2db-0.0.3-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file fits2db-0.0.3.tar.gz.

File metadata

  • Download URL: fits2db-0.0.3.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for fits2db-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0d7f810dc190d119a78bdb98682b09c5d00cd10546e6b5f0e08268d1cc409c91
MD5 9ddebc6f155207289ca3c6dded02afb8
BLAKE2b-256 12eebbcac4d669cba6c263c87afccc33031e4c35600c087058bdbb2697a030f3

See more details on using hashes here.

File details

Details for the file fits2db-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: fits2db-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for fits2db-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a268503312f4e11925bf74efbfdf1ab1c573cc72fa8bcd7027e9a40a0a66f472
MD5 89bc09da65b82107fdbaae4995426b6c
BLAKE2b-256 e3baccf710f59ecf86f193c3f16be3a1734cc1875fb0dca7624a024b334265bb

See more details on using hashes here.

Supported by

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