Skip to main content

use

path

from libtokit.path import mkdirs

def test_create_directory():
    test_path = "./test_dir/sub_dir"
    
    # 调用函数创建目录
    err, msg = mkdirs(test_path)
    # 检查目录是否创建成功
    assert err == False, f"目录创建失败 err: {err}!{msg}"
    assert os.path.exists(test_path), "目录创建失败!"
    # 清理测试目录
    os.removedirs(test_path)

oj call

from libtokit.call import Judger

def main():
    result = Judger.run(
        max_cpu_time=1000,
        max_real_time=3000,
        max_memory=128 * 1024 * 1024,
        max_stack=128 * 1024 * 1024,
        max_output_size=1024 * 1024,
        max_process_number=UNLIMITED,
        exe_path='/path/to/executable',
        input_path='/path/to/input',
        output_path='/path/to/output',
        error_path='/path/to/error',
        args=['arg1', 'arg2'],
        env=['ENV_VAR=value', 'ANOTHER_VAR=another_value'],
        log_path='/path/to/log',
        seccomp_rule_name='default',
        uid=1000,
        gid=1000,
        debug=True,
    )
    print(f'Result: {result}')

oj parse

from libtokit.parse import parse_json, parse_yaml


def main():
    xml_file = 'test.xml'  # 替换为实际 XML 文件路径
    parser = ProblemParser(xml_file)  # 初始化解析器
    parser.parse()  # 解析 XML 文件
    parsed_data = parser.to_json()  # 转换为 JSON 格式
    if parsed_data:
        print(parsed_data)  # 打印 JSON 数据

Metadata

Release files for 3tokit 0.1.1

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

Source distribution (sdist)

Source distribution for 3tokit 0.1.1
File Size Uploaded Provenance Actions
3tokit-0.1.1.tar.gz 3.1 kB Without provenance Details for 3tokit-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 6.3 kB

Release files / 3tokit-0.1.1.tar.gz

Download URL 3tokit-0.1.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dca1afe833283ec673542e7337e47f5e2fd4879f7e92707da84ef7d4153eb04a
BLAKE2b-256 checksum
How to use checksums
aa9baf60a0bb013f9982f72bd00c2278e33d713eb5f7b7d5757a95cab1691a87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Release files / 3tokit-0.1.1-py3-none-any.whl

Download URL 3tokit-0.1.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
631b1a8f5a97352b645a52befa5991bea157dce4d24780d1d5fd7a5fc0de4dbb
BLAKE2b-256 checksum
How to use checksums
014e7ae11ede7817e0818408fe1dd4a84ab85a656af352b7e0669eaf4171357c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Security for 3tokit 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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