Skip to main content

XingYun (行雲)

XingYun is a package that helps store data , code and log to cloud and manage them. Tastes better if consumed together with EgorovSystem.

Installation

pip install xingyun

Before use, better to set up EgorovSystem and set values for the following entries: aws_access, xingyun-getid, xingyun-GlobalDataManager.

Example

Below is an example for usage. For more advanced usage see doc.

project 1

# project_1.py
from xingyun import GlobalDataManager, Logger, make_hook_logger

logger = Logger()
G = GlobalDataManager("test/1" , [make_hook_logger(logger)])

# ----- save data -----
G.set("a", 114514, force_timestamp = 0)
G.set("a", 1919810)

# ----- load data -----
assert G.get("a") == 1919810
assert G.get("a", time_stamp = 0) == 114514

# ----- save log -----
G.log("哼哼哼啊啊啊啊啊") # stdout: 哼哼哼啊啊啊啊啊
assert G.get("_log").endswith("哼哼哼啊啊啊啊啊")

# ----- save code -----
G.log_code()
assert G.get("_code").get("project_1.py") == open("project_1.py", "r").read()

project 2

# project_2.py
from xingyun import GlobalDataManager, Logger, make_hook_logger

logger = Logger()

# share data between multiple runs by initializing with the same name.
G = GlobalDataManager("test/1")

# ----- load data from another run -----
assert G.get("a") == 1919810
assert G.get("a", time_stamp = 0) = 114514

Metadata

Release files for xingyun 0.0.8.post14

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

Source distribution (sdist)

Source distribution for xingyun 0.0.8.post14
File Size Uploaded
xingyun-0.0.8.post14.tar.gz 17.7 kB Details

Release files / xingyun-0.0.8.post14.tar.gz

Download URL xingyun-0.0.8.post14.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
832be25e9d8ae1941122e30bbcaaa9acfb46e7a0dc64b37be47d9351ef94a6e4
BLAKE2b-256 checksum
How to use checksums
6fe778223e9f440d580a1c7b8f256c6a9d2438efe5c10366b2c3c1f81bcc801a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.8
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