Skip to main content

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.
  • .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

  1. Config pypi API token poetry config pypi-token.pypi <token>
  2. poetry build --format=wheel
  3. poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

xchtools-0.1.11-py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 3

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