Skip to main content

No project description provided

Project description

sputchedtools

Simple, powerfull different-purpose module, initially created to reduce repetetive functions defenitions across projects

Installation

pip install sputchedtools

Features

Miscellaneous Classes

  • Anim - Animated loading 'spinner' with customizable characters and text (using set_text)
  • ProgressBar - Progress bar for iterables with customizable text. Simply displays completed iterations out of overall length
  • AsyncProgressBar - Asynchronous version of progress bar. Has gather and as_completed methods
  • NewLiner - Context manager for adding newlines before/after code blocks
  • Timer - Context manager for code execution timing

Asynchronous Operations

  • aio class with methods:
    • _request() - aiohttp/httpx/niquests Manually-specified request
    • request() - aiohttp/httpx/niquests GET requests
    • post() - aiohttp/httpx/niquests POST requests
    • open() - aiofiles file operations
    • sem_task() - Semaphore-controlled task execution

Number Formatting

  • num class with methods:
    • shorten() - Convert numbers to shortened form (e.g., 1000000 → 1M)
    • unshorten() - Convert shortened numbers back (e.g., 1M → 1000000)
    • decim_round() - Smart decimal rounding, returns *str object, mainly for readability purpose
    • beautify() - Combine shortening and decimal rounding

Web3 Utilities

  • Web3Misc - Ethereum-related utilities:
    • Gas price monitoring
    • Transaction nonce tracking
    • Gas estimation (-monitoring)

Minecraft Version Management

  • MC_Versions - Minecraft version manifest handling - Version sorting, list to stringified range converter

Compression Tools

  • compress() - File/Directory/Stream/Bytes compression with multiple algorithms:
    • gzip, bzip2, lzma, zlib, lz4, zstd, brotli
  • decompress() - Auto-algo-detective File/Directory/Stream/Bytes decompression

Usage Example

Checkout test.py

Running test.py

git clone https://github.com/Sputchik/sputchedtools.git && cd sputchedtools
pip install -r reqs
python3 test.py

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

sputchedtools-0.30.4.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

sputchedtools-0.30.4-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file sputchedtools-0.30.4.tar.gz.

File metadata

  • Download URL: sputchedtools-0.30.4.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for sputchedtools-0.30.4.tar.gz
Algorithm Hash digest
SHA256 0bdff1608470ffa68f2e27f45caaa6bb8ab2d749268d9deb4df582623c0a1b8e
MD5 6f2fc256db0c0e9b430b57d82b7e8aca
BLAKE2b-256 15804701d650b8300d5096b46fea40e5979c42feefabe2558a44cc2d5d82b03e

See more details on using hashes here.

File details

Details for the file sputchedtools-0.30.4-py3-none-any.whl.

File metadata

  • Download URL: sputchedtools-0.30.4-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for sputchedtools-0.30.4-py3-none-any.whl
Algorithm Hash digest
SHA256 569512d44d69be3d0ec915f63ab074d0d107d167c1034b25ed1e0152e9c05d0c
MD5 5e699dfe4e32f3be28cce2f9a145aaa0
BLAKE2b-256 747731dd1be06bf0389b697dd33101287e31dfcf8b0e28cac992f1e73589141b

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