Skip to main content

CLI tool convert .csv files to .db files and vice-versa

Project description

command usage (CLI)

See list of commands with
rin_proj1 --help

Error logging is only compatible with exec-based-on-env
read_csv_and_insert_to_db : Adds contents of provided csv to a .db file
export_db_to_csv : Adds contents of provided db to a .csv file

set-config

Executes read_csv_and_insert_to_db and export_db_to_csv functions with the given config file. If no path is provided, tries to open config.yaml in the current directory.
 rin_proj1 set-config --path path/to/config.yaml

for default/config in current directory, use main1


set-db

Executes read_csv_and_insert_to_db and export_db_to_csv functions with the db_name provided by user.

rin_proj1 set-db saves data.db in current directory
rin_proj1 set-db db_name saves to db_name in current directory. Will create a file if not present


exec-based-on-env

Executes read_csv_and_insert_to_db and export_db_to_csv functions with csv file depending on the environment type
rin_proj1 exec-based-on-env

If you want to run the command in a different environment,

poetry shell
export APP_MODE=env_name
rin_proj1 exec-based-on-env

env_name options: development, testing, production


Successful execution should print confirmation message in terminal. If there is no output, check for a mpj1_error.log file to determine the error.

Expected yaml file layout (minimum):

LOG_LEVEL: log_level (see below for valid options)

APP_MODE:
  csv_file: path/to/data.csv
  db_file: path/to/data.db
  table_file: your_table_name

log_level options: critical, error, warning, info, debug

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

rin_proj1-1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

rin_proj1-1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file rin_proj1-1.0.tar.gz.

File metadata

  • Download URL: rin_proj1-1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic

File hashes

Hashes for rin_proj1-1.0.tar.gz
Algorithm Hash digest
SHA256 61f98403ec0d67420ffdfcf475a1a5fc43d2e67b2d8849c801b246d64fb87735
MD5 af8c967f0db5a257c453976d97fb86eb
BLAKE2b-256 61e089b6b06a6a29a61dc7cb53acab0a1568b0b167d360bc9a5406ffa7608dc1

See more details on using hashes here.

File details

Details for the file rin_proj1-1.0-py3-none-any.whl.

File metadata

  • Download URL: rin_proj1-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic

File hashes

Hashes for rin_proj1-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd673b3a0ca3cdbed68c31465d51ed79b3b3cd336127e502a6eb6032f4352c54
MD5 5e847b95270f49d239cc871236ce2218
BLAKE2b-256 3d3d50612fec14038388d0fa6da19430cbb6c96bf06c80e00376cc8ed39862de

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