Skip to main content

Base library of foyono projects

Project description

foyndation

Base library of foyono projects.

This README is auto-generated, see project wiki for details.

API

foyndation

initlogging
def initlogging()

Initialise the logging module to send debug (and higher levels) to stderr.

innerclass
def innerclass(cls)

An instance of the decorated class may access its enclosing instance via self.

invokeall
def invokeall(callables)

Invoke every callable, even if one or more of them fail. This is mostly useful for synchronising with futures. If all succeeded return their return values as a list, otherwise raise all exceptions thrown as a chain.

onerror
@contextmanager
def onerror(f)

Context manager that runs the given function if an exception happens, like finally excluding the happy path. Return a true value from f to declare the exception was handled i.e. prevent it from being re-raised.

rmprefix
def rmprefix(text, prefix)

Return text with prefix removed, or None if text does not start with prefix.

rmsuffix
def rmsuffix(text, suffix)

Return text with suffix removed, or None if text does not end with suffix.

singleton
def singleton(t)

The decorated class is replaced with a no-arg instance. Can also be used to replace a factory function with its result.

solo
def solo(v)

Assert exactly one object in the given sequence and return it.

parabject

register
def register(obj, paracls)

Instantiate paracls, set obj to be the regular object associated with the new parabject, and return the parabject.

dereference
def dereference(parabject)

Get the regular object associated with parabject or raise UnknownParabjectException.

Parabject Objects

class Parabject()

Subclasses typically implement __getattr__ for dynamic behaviour on attribute access, use unmangle there to undo name mangling.

__neg__
def __neg__()

Dereference this parabject.

unmangle
def unmangle(name)

Undo name mangling.

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

foyndation-18.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

foyndation-18-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file foyndation-18.tar.gz.

File metadata

  • Download URL: foyndation-18.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for foyndation-18.tar.gz
Algorithm Hash digest
SHA256 aa336231a7d17b180ca22b8252bc97f6bda37320738fdd35688a7ad21d88e75e
MD5 f58c5d61e94a0bed7beb36cba2bb3c62
BLAKE2b-256 1d003f8ce6ae3f51b952cb5b889956b574c7f36bab05941d342f1ed8d473073a

See more details on using hashes here.

File details

Details for the file foyndation-18-py3-none-any.whl.

File metadata

  • Download URL: foyndation-18-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for foyndation-18-py3-none-any.whl
Algorithm Hash digest
SHA256 90214b3df16da6b5f5c8b46f7e7160d54aa98a158f5e0d81a5e72e659bf1374a
MD5 d45288ccf76d2e8a7a9b8a9a89d28155
BLAKE2b-256 8eea532eec6eead89da3bceb7b0da4892d667a9e7cf8855fe4a744fe31a3aaad

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