No project description provided
Project description
Config
In your own project, there should be a settings.toml
and a .env
file.
settings.toml
stores the common config.- To use connections module,
[default.db]
is a must.
- To use connections module,
.env
stores secret things like passwords.
Usage
connections module
mysqldb connection example toml:
[default.db]
host = "replace with your host"
port = 3306
user = "root"
password = "@format {env[MYSQLDB_PASSWORD]}"
Usage in your code:
from xchtools import XCHConnections
xc = XCHConnections(os.path.dirname(os.path.abspath(__file__)))
config = xc.settings
print(config.db)
xc.sql2df("show databases")
For developer
Build and Release
- Config pypi API token
poetry config pypi-token.pypi <token>
poetry build --format=wheel
poetry publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xchtools-0.1.10.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for xchtools-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 892ec3450eb911b09640f34dfa9a1d2aa83d2f8fd16c77e1f022bf777f20b05f |
|
MD5 | 01a7caa69de4d7d0156be8db0a5cf88d |
|
BLAKE2b-256 | da81ab519268b6b976ab90c4f0c764a7094597ae47f18c0bf196972b41c31b75 |