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")
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
- 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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
xchtools-0.1.14-py3-none-any.whl
(10.7 kB
view hashes)
Close
Hashes for xchtools-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8779145df4ef1d913370517e7606ddf80f86b8929467d10d275235966779566e |
|
MD5 | c7ae849a56e2e5deab1d7216c4458989 |
|
BLAKE2b-256 | 16bdf8e2f25722d7c877862bfdbd44e93dcf020a2ce1e3e53aeba57d337266dc |