xml utility
Project description
ezxml
pip install xmlvault
xmlvault --help
Purpose
The purpose of this project is to centralize the database connections file (as YAML) on a user's machine. The project has two utilities:
-
Connection Manager: Allows you to choose and load a connection string in a Python code quickly.
Python code usage example:
from app.src.connection_utility import load_connections, choose_connection from sqlalchemy import create_engine import pandas as pd def main(): connections = load_connections() conn = choose_connection(connections) engine = create_engine(conn) query = input("Input your query: ") df = pd.read_sql_query(query, engine) print(df) if __name__ == "__main__": main()```
-
Connection Utility: Allows you to save new connections, and add, update, delete, or see existing connections in the saved YAML file.
Running the Project
To run this project, you need to define and save a path with the name conn_home. This is where you’ll save the connections.yaml file, which stores your database credentials.
For Windows (CMD):
# Define and save the path
setx conn_home "C:\path\outside\your\project\preferably"
# Check the path
echo %conn_home%
# Define and save the path
setx conn_home "C:\path\outside\your\project\preferably"
# Check the path
echo %conn_home%
For Windows Powershell:
# Define and save the path
[System.Environment]::SetEnvironmentVariable('conn_home', 'C:\path\outside\your\project\preferably', 'User')
# Check the path
$env:conn_home
For Linux:
# Define and save the path in your .bashrc
echo 'export conn_home="path/outside/your/project/preferably"' >> ~/.bashrc
# Source the .bashrc to apply changes
source ~/.bashrc
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 xmlvault-0.0.3.tar.gz.
File metadata
- Download URL: xmlvault-0.0.3.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b108ae3ce34d731377e8f29a75b529ade7131e05af5ec815ac3e87cc05b1ea
|
|
| MD5 |
1d7286e5b0e83722f9b4399e151c9204
|
|
| BLAKE2b-256 |
3f7a74ea0023d71db4db0f7984e98285e6cff647975d1084bfd17d49a3119d3b
|
File details
Details for the file xmlvault-0.0.3-py3-none-any.whl.
File metadata
- Download URL: xmlvault-0.0.3-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
475164918180f6d6733aced96cf8123fa1604aaa2792d1ec2422d5064f54b296
|
|
| MD5 |
b261d77cea24f4ca5842e2a818f6fa1f
|
|
| BLAKE2b-256 |
1456aed36e6c0a009caa51df9f7f63a46b8d4b85d3a23268658ae181626f2fb8
|