Skip to main content

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

Metadata

Release files for xchtools 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for xchtools 0.1.15
File Interpreter ABI Platform
xchtools-0.1.15-py3-none-any.whl Python 3 none any Details

Release files / xchtools-0.1.15-py3-none-any.whl

Download URL xchtools-0.1.15-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42beccf1aabd551645c3efe3df47dc963fb7558a5d1f9f22eb81875e79635032
BLAKE2b-256 checksum
How to use checksums
eb3cf1da9d95fa756ab96344f5692368527373258e0cafcbfd702711daff6e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.13 Windows/10

Release history Release notifications | RSS feed

This release

0.1.15 This release

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

2 release files

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page