Skip to main content

Python application framework

Project description

fleks    
Python application framework

Overview

(This is experimental; API-stability is not guaranteed.)

Application framework for python.


Features

  • CLI parsing with click
  • Console output with rich
  • Plugin Framework
  • Exit-handlers, conventions for handling logging, etc

Installation

See pypi for available releases.

pip install fleks

Usage

See also the unit-tests for some examples of library usage.

Tags & Tagging

>>> from fleks import tagging
>>> class MyClass(): pass
>>> tagging.tags(key="Value")(MyClass)
<class '__main__.MyClass'>
>>> assert tagging.tags[MyClass]['key']=="Value"
>>>

Class-Properties

>>> import fleks 
>>> class Test:
...   @fleks.classproperty 
...   def testing(kls):
...      return 42
>>> assert Test.testing==42
>>>

Typing helpers

fleks.util.typing collects common imports and annotation-types, i.e. various optional/composite types used in type-hints, underneath one convenient namespace. This includes stuff from:

>>> from fleks import typing
>>> print(sorted([name for name in dir(typing) if name.title()==name]))
['Annotated', 'Any', 'Awaitable', 'Bool', 'Callable', 'Collection', 'Container', 'Coroutine', 'Counter', 'Deque', 'Dict', 'Field', 'Final', 'Generator', 'Generic', 'Hashable', 'Iterable', 'Iterator', 'List', 'Literal', 'Mapping', 'Match', 'Namespace', 'Optional', 'Pattern', 'Protocol', 'Reversible', 'Sequence', 'Set', 'Sized', 'Text', 'Tuple', 'Type', 'Union']
>>>

Base-classes for Configuration

>>> from fleks import Config
>>>

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

fleks-2024.4.26.8.26.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

fleks-2024.4.26.8.26-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file fleks-2024.4.26.8.26.tar.gz.

File metadata

  • Download URL: fleks-2024.4.26.8.26.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for fleks-2024.4.26.8.26.tar.gz
Algorithm Hash digest
SHA256 7f6760081959d5043208dc8515a1e3c8e8db02942f6a79770991279c8ce64780
MD5 224ae1284dec18e51b964713466622f3
BLAKE2b-256 6ba078d6ddba56e60cb9ef883c0c2e4bb1deccb594dbf2da4aebacfaf9d9caf8

See more details on using hashes here.

File details

Details for the file fleks-2024.4.26.8.26-py3-none-any.whl.

File metadata

  • Download URL: fleks-2024.4.26.8.26-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for fleks-2024.4.26.8.26-py3-none-any.whl
Algorithm Hash digest
SHA256 aab9098e572851754c41dd1b8fb93e5e82cf2814b333d2ecfc68c223ccdd285d
MD5 9623bf853ef51c8d9eb9e25b93a05347
BLAKE2b-256 13ecf04b7f4539416e0adf088e2b243cdc46a22e773af19e83d7ae35b41905cb

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