bellman_tools
Project description
Bellman Tools (bellman_tools)
Python tools to upload data into SQL Server using SQL Alchemy
Installation
pip install bellman_tools
Usage
SQL Tools
To retrieve data from a SQL Server. You need first to add connection string to the .env file in the root folder.
Example of the .env file:
DATABASE_CONNECTION_STRING="mssql+pyodbc://user:password@server_name:1433/{db}?driver=SQL+Server"
Then you can execute this python code :
from bellman_tools import sql_tools
SQL = sql_tools.Sql(db='DB')
df = SQL.load_dataframe_from_query("SELECT TOP 1 * FROM Test")
Upload Tools
To upload data into a SQL Server database.
import pandas as pd
from bellman_tools import sql_tools, upload_tools
SQL = sql_tools.Sql(db='SAM')
UPLOAD = upload_tools.Upload(SQL)
from bellman_tools.database import Test
df = pd.DataFrame([dict(Test='Testing with Upload tools')])
UPLOAD.load_basic_df_to_db(
df,
SQL_Alchemy_Table=Test.Test,
)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bellman_tools-0.1.tar.gz.
File metadata
- Download URL: bellman_tools-0.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e42bb7e4f678cbeaf78c2919bc3f373980f80ce1f33d3260a4236eb0fe6b798f
|
|
| MD5 |
d88e0362b5ab66498e05476696ac8322
|
|
| BLAKE2b-256 |
4a11108c62a9b680e4263db7bc26453394e11f927ede155316feb0c5bef866c4
|
File details
Details for the file bellman_tools-0.1-py3-none-any.whl.
File metadata
- Download URL: bellman_tools-0.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
234e89382f43aa5d427f942f1df0249a0d2bc63ffdd90b611d40fa2414a4038f
|
|
| MD5 |
efaf41cb4028c47f8153375a78c09872
|
|
| BLAKE2b-256 |
08c94ee20e7b12c8263b8e0eef9ecf8c089fd13b419b664c0c79f8d8cb5725dc
|