Skip to main content

Vermils Magic Pocket 4 Python

Installation

Basic

pip install vermils

With HTTP support

Required by vermils.io.puller

pip install vermils[http]

With full support

pip install vermils[all]

Importing

import vermils

Table of Contents

Most of the codes are easy to understand or well documented, the documentation is only for the more complex ones.

vermils.asynctools

Tools for asynchronous programming.

  • sync_await: Run async functions in a sync environment.
  • ensure_async: Wraps a function/generator into an async function if it's a sync one.
  • to_async: Wraps a function into an async function blindly.
  • to_async_gen: Wraps a generator into an async generator blindly.
  • get_create_loop: Get the current event loop or create a new one if there isn't one. Works in another thread, unlike asyncio.get_event_loop`.
  • async_run: Run sync functions asynchronously in another thread without wrapping first.
  • AsinkRunner: A class that runs sync functions asynchronously and sequentially in another thread.
  • select: Similar to select in Go, supports both awaitables and async generators.

Documentation: vermils.asynctools

vermils.collections

Collections of useful classes.

  • fridge: Make things immutable and hashable.
    • FrozenDict: A dict that is immutable and hashable.
    • FrozenList: A list that is immutable and hashable. Basically, a tuple but can be compared with lists.
    • freeze: Recursively freeze an object.
  • StrChain: A simple way to create strings. Extremely useful.
  • ObjDict: A dict that can be accessed like an object.

Documentation: vermils.asynctools

vermils.gadgets

Snippets of code that I am too lazy to categorize.

  • sidelogging.SideLogger: Move any LoggerLike into another thread.
  • MonoLogger: Log different levels of messages to different files.
  • stringify_keys: Recursively convert all keys in a dict to strings.
  • supports_in: Check if an object supports in.
  • mimics: A decorator that makes a function mimic another function.
  • sort_class: Sort class by inheritance, child classes first.
  • str_to_object: Convert a string to an object.
  • real_dir: Get the real directory of a file. Auto expands ~ and env vars.
  • real_path: Get the real path of a file. Auto expands ~ and env vars.
  • version_cmp: Compare two SemVer strings.
  • to_ordinal: Convert an integer to its ordinal form.
  • selenium_cookies_to_jar: Convert Selenium cookies to a http.cookiejar.CookieJar object.

Documentation: vermils.gadgets

vermils.io

Tools for I/O.

  • aio: Async IO
    • os: Async version of some os functions.
      • fsync
      • link
      • symlink
      • mkdir
      • makedirs
      • remove
      • ... and more
    • path: Async version of some os.path functions
      • exists
      • isdir
      • isfile
      • islink
      • ... and more
  • puller: A multithread async downloader module
    • AsyncPuller: A class that downloads files asynchronously.
    • Modifier: A class that modifies the behaviour of the puller, e.g show a progress bar.
  • DummyFileStream: A dummy file stream that does nothing.
  • DummyAioFileStream: A dummy async file stream that does nothing.

Documentation: vermils.io

vermils.react

A simple event system.

  • ActionChain: A chain of functions that can be executed in order or in parallel.
  • ActionCentipede: The output of a function becomes the input of the next function.
  • EventHook: A simple event hook, that binds events to chains of functions.

Documentation: vermils.react

vermils.tensorflow

TensorFlow related tools.

  • inspect
  • callbacks
  • layers
  • metrics
  • models

Documentation: vermils.tensorflow

Metadata

Release files for vermils 0.3.6

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

Source distribution (sdist)

Source distribution for vermils 0.3.6
File Size Uploaded Provenance Actions
vermils-0.3.6.tar.gz 29.5 kB Without provenance Details for vermils-0.3.6.tar.gz

Built distribution (wheel)

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

Total release size: 65.7 kB

Release files / vermils-0.3.6.tar.gz

Download URL vermils-0.3.6.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c9683d01cd8a8fb558a2c16074771c132ac6541de4d9ed82c144b3bcd22b69dc
BLAKE2b-256 checksum
How to use checksums
ac75796436bb9165ec1a72d2b8a02b940ccaba078d37dbb1a00322b76e98795d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.5.0-17-generic

Release files / vermils-0.3.6-py3-none-any.whl

Download URL vermils-0.3.6-py3-none-any.whl
Size 36.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19b3592d4cb0b18bef0c477e92fdd1d0d51373565ef2c6cfe0d7c580bfb52180
BLAKE2b-256 checksum
How to use checksums
77a40260a66abf2f4f61e54f298f8d947018e332aa5b1194cfdb8371d1befd69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.5.0-17-generic

Security for vermils 0.3.6

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.

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