Skip to main content

saad-s

حزمة Python خفيفة باسم saad_s تعيد تصدير واجهة وحدة os القياسية باسم جديد. لا توجد اعتماديات خارجية، وتعمل على Pydroid 3 وTermux والبيئات المتوافقة مع Python.

التثبيت

بعد نشرها على PyPI:

python -m pip install saad-s

الاستخدام

import saad_s

print(saad_s.getcwd())
print(saad_s.listdir("."))
print(saad_s.path.join("SAAD", "data.txt"))
print(saad_s.environ.get("HOME"))

أمثلة الملفات والمجلدات

import saad_s

folder = "saad_demo"
saad_s.makedirs(folder, exist_ok=True)

file_path = saad_s.path.join(folder, "hello.txt")
with open(file_path, "w", encoding="utf-8") as file:
    file.write("Hello from SAAD")

print(saad_s.path.exists(file_path))
print(saad_s.path.getsize(file_path))
saad_s.remove(file_path)
saad_s.rmdir(folder)

الواجهة

تتوفر الدوال والسمات العامة في os تقريبًا، بما فيها getcwd وlistdir وmakedirs وmkdir وremove وrename وwalk وenviron وpath وstat وsystem. السمات غير المعرّفة مباشرة تُمرّر إلى وحدة os القياسية.

تنبيه: مثل os تمامًا، تمنح هذه الحزمة برنامجك قدرة مباشرة على التعامل مع الملفات والبيئة والنظام. استخدم system بحذر، ولا تمرر إليها أوامر مبنية من إدخال مستخدم غير موثوق.

الترخيص

MIT.

Metadata

Release files for saad-s 0.1.0

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 saad-s 0.1.0
File Interpreter ABI Platform
saad_s-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / saad_s-0.1.0-py3-none-any.whl

Download URL saad_s-0.1.0-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e797fe3ae4da4332ccd872329a567a25ccc21c39f8fbf5b3e5069415ba6acd30
BLAKE2b-256 checksum
How to use checksums
0508d69a1faaa6d5f861a8eb60c79f73b0e7b06bc406dde976abb223141678b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

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