Skip to main content

Creating relational databases with SQLite but easier. More information follows.

Project description

**Version 0.4**


--- What can db_env do? ---
db_env aims to make it easier and more straight forward to create relational database environments within Python. db_env uses SQLite and Pandas as dependencies. Currently db_env holds the following functions:
- create_connect_db --> connecting to newly created database
- create_table_sql --> connecting to database and creating tables within
- insert_data_sql --> connecting to database and inserting data
- select_data_sql --> connecting and fetching data from chosen tables. It automatically creates a new Pandas dataframe for further analysis.


--- important Info: ---
- this library needs SQLite3 and Pandas in addition. As dependencies all packages will be installed automatically.
- SQL-Usage: db_env uses SQLite and therefore SQL-statements for creating, calling and manipulating data.
- it is encouraged to import your writen SQL-strings from another py-file as a variable (e.g. ENUM). However, you can directly insert your SQL-statement as a string into the function.

--- Example SQL-statements for existing functions: ---
--> create_table_sql =
"DROP TABLE IF EXISTS ORDERS; CREATE TABLE ORDERS(ID INTEGER, NAME VARCHAR(30));"

--> insert_data_sql =
"INSERT INTO ORDERS (ID, NAME) VALUES (1, 'Frank');"
or
(f'''INSERT INTO ORDERS (ID, NAME) VALUES
(5, 'John'),
(6, 'Tobias'),
(7, 'Lisa');''', "orders.db")

--> select_data_sql =
"SELECT * FROM ORDERS;"


--- Goal for upcoming versions: ---
- Functions which give user the option to write his own SQL-statements into an extra Python file and call writen SQL-strings as variables into your working environment.
- Functions to collect and insert data from called API.


-------------- CHANGES in VERSION 0.4 --------------
2024-02-25

- installed dependencies (Pandas)
- created function to select data from db and create dataframe
- created function to insert data into database manually

----------------------------------------------------

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

db_env-0.4.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_env-0.4.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file db_env-0.4.2.tar.gz.

File metadata

  • Download URL: db_env-0.4.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for db_env-0.4.2.tar.gz
Algorithm Hash digest
SHA256 fe4fae2ff21c961687c7864eeeed17315d99de2ebe0765fca4bd5f52253b77fd
MD5 8ca9c5cd82f9edc8e6fe67029802e636
BLAKE2b-256 60764c77970d67264f9ecd0727d09c74784f4932d6eb45e7cd70afee88e88c50

See more details on using hashes here.

File details

Details for the file db_env-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: db_env-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for db_env-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72ddad9431654c3cc16e173d2b1d1288a9438fed828bcecab6c78af760d89af5
MD5 39bd5d09ee38c4f9d0a2a5ee97136542
BLAKE2b-256 677e8decbf680a9c9eb718625aa2bfcb3999c11919c413956fb6e3c6c03359be

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