Skip to main content

CLI tool to 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 rin_proj1 set-config


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, open/spawn the shell where command is to be run:

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)

env_name:
  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.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

rin_proj1-1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rin_proj1-1.1.tar.gz
  • Upload date:
  • Size: 3.6 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.1.tar.gz
Algorithm Hash digest
SHA256 b60e20da719ea0f8d0ed04b5cfaa6faaa9db911ff557b86fabe06ba103fb5e84
MD5 9b29ac144f01d675cce2c82281b7499d
BLAKE2b-256 650690ca57e5114f4d7380d0516d15b20c255f5d68fab098ee1329494d113a38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rin_proj1-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d438b5af1f52ec4a66f4510e67efec2df3095f1131fb4ab8b031129647c2742c
MD5 24e08b160fd2c1b70a2c8b0e973fcfea
BLAKE2b-256 6c27f71b8e08b646904099a234945677b60b6ee651552bf359bb634fec981ef6

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