Skip to main content

A powerful OS manipulation package with built-in memory and hardware management.

Project description

oscalling

oscalling defines a new standard for OS interaction in Python. Designed by Rheehose (Rhee Creative), this package not only wraps the standard os module for seamless integration but also introduces advanced capabilities for memory management, leak prevention, and intelligent hardware resource handling.

Built for high-performance and safety, oscalling ensures your system operations are fast, secure, and resource-efficient.

Features

  • Enhanced File System: One-liner copies, moves, atomic writes, and smart directory traversal.
  • Process Management: Run commands, kill processes by name, and manage background tasks easily.
  • Memory Guard: Active memory monitoring and automatic garbage collection triggers to prevent leaks.
  • Hardware Optimized: Intelligent resource allocation helpers to query and manage system load.
  • Environment Control: Easy get/set for environment variables and PATH manipulation.
  • Zero Overhead: Designed to be lightweight and fast.

Installation

pip install oscalling

Quick Start

import oscalling

# Initialize the enhanced OS manager
manager = oscalling.SystemManager()

### File System Operations ###
# Safe file operation (auto-cleanup resources)
manager.fs.safe_write('log.txt', 'System checked.')
manager.fs.copy('log.txt', 'log_backup.txt')
print(f"File size: {manager.fs.get_size('log.txt', human_readable=True)}")

### Process Management ###
# Run a shell command easily
result = manager.proc.run("echo 'Hello from oscalling!'")
print(result.stdout)

### Memory & Hardware ###
# Check memory status and optimize if needed
if manager.memory.is_critical():
    manager.memory.optimize()

# Get hardware stats
stats = manager.hardware.get_stats()
print(f"CPU: {stats['cpu_percent']}%, RAM: {stats['memory_percent']}%")

### Environment ###
manager.env.set("MY_APP_MODE", "production")
print(f"App Mode: {manager.env.get('MY_APP_MODE')}")

License

Copyright (c) 2008-2026 Rheehose (Rhee Creative). Licensed under the MIT License.

Author

  • Rheehose (Rhee Creative)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oscalling-1.0.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oscalling-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file oscalling-1.0.0.tar.gz.

File metadata

  • Download URL: oscalling-1.0.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for oscalling-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2d63c42e29133a0f4f38ed87981210341c2147472ceba09800b26de9e536582b
MD5 2151297a87d04d77b5415b4121f5bb73
BLAKE2b-256 541608e36c8bbaad1dcaddef7992b970e0f06ae382683085e0510779b29fa0ac

See more details on using hashes here.

File details

Details for the file oscalling-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: oscalling-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for oscalling-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d454ad7a57669acac2667720ee6d6e0ff89a7eed7853d8e44d27068454f79ef
MD5 db11d722062d8d63286a6c377e68f86c
BLAKE2b-256 5ea7f320d34353e83a511467ccc2c8cab0a75886c3bed5118d107433f6b0f654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page