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")
from xchtools import ACAutomaton
ac_automaton = ACAutomaton()
words = ["张坤", "易方达", "张凯", "阿里"]
text = "易方达基金近日发布了一个智能助手,由阿里云智能提供。"
for word in words:
    ac_automaton.add_word(word)
ac_automaton.build()
print(ac_automaton.search(text)) 

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

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

xchtools-0.1.15-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file xchtools-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: xchtools-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Windows/10

File hashes

Hashes for xchtools-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 42beccf1aabd551645c3efe3df47dc963fb7558a5d1f9f22eb81875e79635032
MD5 50e8602c13477dd53e97b5d6e211b106
BLAKE2b-256 eb3cf1da9d95fa756ab96344f5692368527373258e0cafcbfd702711daff6e23

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