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 libtokit 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libtokit-0.1.9.tar.gz | 4.8 kB | Without provenance | Details for libtokit-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libtokit-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for libtokit-0.1.9-py3-none-any.whl |
Total release size: 10.5 kB
Release files / libtokit-0.1.9.tar.gz
| Download URL | libtokit-0.1.9.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
686b9bf1f37173481d658cf21c8462cae8e513cc56c035250411cde1fed9d971
|
|
BLAKE2b-256 checksum How to use checksums |
ba1163a1d8f7b24c18cc1af4ccb7c49fd2120fde90a6a3a5ebcdf0346605a93f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.1
|
Release files / libtokit-0.1.9-py3-none-any.whl
| Download URL | libtokit-0.1.9-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4dc6f3822aeaf4aabf93d5b7d9ea18def3daeba9683aee6335c898e813678e7
|
|
BLAKE2b-256 checksum How to use checksums |
c76696732192193022b63cb802819134baa1c0158a51e46e21eacc839ba408e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.1
|
Security for libtokit 0.1.9
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.