Skip to main content

configless is tiny small configurator, inspired by pyramid’s configurator. but this is silly not comprehensive.

how to use

you can develop foo function, so IHasFoo interface. and you are providing two variants of foo function. (my.foo and your.foo are these)

## definition
from zope.interface import Interface, implementer
from configless.interfaces import IPlugin

class IHasFoo(Interface):
    def foo():
        pass

@implementer(IHasFoo, IPlugin)
class MyFoo(object):
    @classmethod
    def create_from_setting(cls, settings):
        return cls()

    def foo(self):
        return "my"

@implementer(IHasFoo)
class YourFoo(object):
    @classmethod
    def create_from_setting(cls, settings):
        return cls()

    def foo(self):
        return "your"


## using
from configless import Configurator
config = Configrator()

## install many plugins about `foo`
config.add_plugin("my.foo", MyFoo, categoryname="foo")
config.add_plugin("your.foo", YourFoo, categoryname="foo")

## activate my.foo plugin, then, my.foo is used by plugin about `foo`.
result = config.activate_plugin("my.foo")

## so, configurator has function about result
config.foo.foo() # => "my"

summary

you can provides ‘foo’ function

  • define plugin

  • install plugin – via config.add_plugin(..)

  • activate plugin – via config.activate_plugin(..)

Metadata

Release files for configless 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for configless 0.1
File Size Uploaded Provenance Actions
configless-0.1.tar.gz 4.9 kB Without provenance Details for configless-0.1.tar.gz

Release files / configless-0.1.tar.gz

Download URL configless-0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b83924df2cc0b56f424e8ac874007cff85bac44a2d37c3d8305218b967bfecbf
BLAKE2b-256 checksum
How to use checksums
409c035a2aa118a5272ec295d5a49bb146487af262c246848a7ed75178996e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for configless 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page