Skip to main content

A package for easing return of multiple values

Project description

Warg

Warg

Build Status Documentation Code style: black Coverage Status codebeat badge Codeship Status for pything/warg codecov
Workflows
Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
On Push Any Documentation Check
CodeQL

Devour everything :wolf: Prey upon

python


Old-Norse: Varg

Only for use with Python 3.6+

This package is a selection of generalised small utility classes for many use-cases in any python project, a brief description of each follow. No external dependencies, #pure-python.

  • A class for easing return of multiple values, implicit handling of args and kwargs and more. Neat access options to the underlying __dict__ of the class instance, supporting almost any variation that comes to mind.

  • A class for executing any 'heavy' function asynchronously storing any results in a bounded queue. Note: communication and organisation is costly, intended for heavy processing functions and general queuing.

  • A set of utility functions for parsing/sanitising python config files, and presenting attributes using common python conventions and practices.

  • Some Mixin classes for iterating Mapping Types.

  • A single base class and metaclass, differentiating on whether subclasses singletons should be instated on own subclass basis or on the supertype.

  • A wrapper class, shorthand "GDKC", for delayed construction of class instances, with a persistent set of proposed kwargs that remain subject to change until final construction.

  • A "contract" decorator, "kw passing" is a concept that lets one make a contract with the caller that all kwargs with be passed onwards to a receiver, this lets the caller inspect available kwargs of the the receiver function allowing for autocompletion, typing and documentation fetching.

  • and more..

Disclaimer

I personally view the collection of tools as a general extensions of the python language for my workflow. I seek to provide implementations and ideas that should remain valid and useful even through future versions of the python language.
These tools are useful to me, I however suspect many of the assumptions and decisions that I made will be frowned upon by more pythonic developers, hence why I would never propose any of these tools be provided in any other way than as installable "extensions".
I seek to make the implementations quite easy to read and intuitive to experienced python developers, but I would refrain usage of "warg" if collaborating with less experienced python developers that would not inspect the implementation details of the package.

Lastly use "warg" with caution for long term projects, as some features might break as python naturally evolves in future releases. Warg uses some advanced features of python and sometimes abuse notation/syntax, with some pretty hard assumptions on parameter input and interaction.

With these rambling comments in mind please have fun with it epic_face


With great power comes great responsibility :wink:


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

Warg-1.0.2.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

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

Warg-1.0.2-py36-none-any.whl (75.5 kB view details)

Uploaded Python 3.6

File details

Details for the file Warg-1.0.2.tar.gz.

File metadata

  • Download URL: Warg-1.0.2.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for Warg-1.0.2.tar.gz
Algorithm Hash digest
SHA256 200aee86fb1b057f183c455fda78055dd5673584d8bd2ef5f472b62ee6201697
MD5 33c4596e1479908a62b9438cf65ce6d5
BLAKE2b-256 8fb2f7ceb7a93fc4e0cc88508b479cc4acea7e64a3f740065dddb5844b209765

See more details on using hashes here.

File details

Details for the file Warg-1.0.2-py36-none-any.whl.

File metadata

  • Download URL: Warg-1.0.2-py36-none-any.whl
  • Upload date:
  • Size: 75.5 kB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for Warg-1.0.2-py36-none-any.whl
Algorithm Hash digest
SHA256 e2262aad19acc8c46f6803a5168685ed159b3bc7e372138dfc64e1f4a6669c11
MD5 6b3cc88e3e4da96d2d52bb1491cb1cce
BLAKE2b-256 c0f02f88ddb48cee3139a2507b278f4a003d8abe57e351e2395b27e86da37e93

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