No project description provided
Project description
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, unlikeasyncio.
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 toselect
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 anyLoggerLike
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 supportsin
.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 ahttp.cookiejar.CookieJar
object.
Documentation: vermils.gadgets
vermils.io
Tools for I/O.
aio
: Async IOos
: Async version of someos
functions.fsync
link
symlink
mkdir
makedirs
remove
- ... and more
path
: Async version of someos.path
functionsexists
isdir
isfile
islink
- ... and more
puller
: A multithread async downloader moduleAsyncPuller
: 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
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
vermils-0.3.6.tar.gz
(29.5 kB
view details)
Built Distribution
vermils-0.3.6-py3-none-any.whl
(36.2 kB
view details)
File details
Details for the file vermils-0.3.6.tar.gz
.
File metadata
- Download URL: vermils-0.3.6.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.5.0-17-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9683d01cd8a8fb558a2c16074771c132ac6541de4d9ed82c144b3bcd22b69dc |
|
MD5 | dd14ba17ed27d4fcda87dd021f5c02cb |
|
BLAKE2b-256 | ac75796436bb9165ec1a72d2b8a02b940ccaba078d37dbb1a00322b76e98795d |
File details
Details for the file vermils-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: vermils-0.3.6-py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.5.0-17-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19b3592d4cb0b18bef0c477e92fdd1d0d51373565ef2c6cfe0d7c580bfb52180 |
|
MD5 | b002e9e2ff1938d89044f9764bb14842 |
|
BLAKE2b-256 | 77a40260a66abf2f4f61e54f298f8d947018e332aa5b1194cfdb8371d1befd69 |