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.

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-16.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

foyndation-16-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: foyndation-16.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for foyndation-16.tar.gz
Algorithm Hash digest
SHA256 346f13f2f6a72e5cc127b8ae2f7a32033892cd8c06d39b82b5c8b567a3b0c7f2
MD5 f9cc57cd5f5ad2ed1ec6a04a5174a523
BLAKE2b-256 7ccd7645b4f357dbb7c75b6ea7a46bc83f608ee37775cfcd200446bc46b11e67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: foyndation-16-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for foyndation-16-py3-none-any.whl
Algorithm Hash digest
SHA256 270a96daef001c17bde409409ddf3015814fff17c28f1c0a378c14a808ea89cc
MD5 3ae01220f138205267987e9275edd89e
BLAKE2b-256 e3abe52404688a75ed256c17a19b005438bde26d03e065962f99fcef767ddf0d

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