Skip to main content

Cotyledon provides a framework for defining long-running services.

Project description

Latest Version Downloads

Cotyledon provides a framework for defining long-running services.

It provides handling of Unix signals, spawning of workers, supervision of children processes, daemon reloading, sd-notify, rate limiting for worker spawning, and more.

Why Cotyledon

This library is mainly used in OpenStack Telemetry projects, in replacement of oslo.service. However, as oslo.service depends on eventlet, a different library was needed for project that do not need it. When an application do not monkeypatch the Python standard library anymore, greenlets do not in timely fashion. That made other libraries such as Tooz or oslo.messaging to fail with e.g. their heartbeat systems. Also, processes would not exist as expected due to greenpipes never being processed.

oslo.service is actually written on top of eventlet to provide two main features:

  • periodic tasks

  • workers processes management

The first feature was replaced by another library called futurist and the second feature is superseded by Cotyledon.

Unlike oslo.service, Cotyledon have:

  • The same code path when workers=1 and workers>=2

  • Reload API (on SIGHUP) hooks work in case of you don’t want to restarting children

  • A separated API for children process termination and for master process termination

  • Seatbelt to ensure only one service workers manager run at a time.

  • Is signal concurrency safe.

  • Support non posix platform, because it’s built on top of multiprocessing module instead of os.fork

  • Provide functional testing

And doesn’t:

  • facilitate the creation of wsgi application (sockets sharing between parent and children process). Because too many wsgi webserver already exists.

oslo.service being impossible to fix and bringing an heavy dependency on eventlet, Cotyledon appeared.

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

cotyledon-2.2.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

cotyledon-2.2.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file cotyledon-2.2.0.tar.gz.

File metadata

  • Download URL: cotyledon-2.2.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cotyledon-2.2.0.tar.gz
Algorithm Hash digest
SHA256 5f9dcc4cfb8124e6550119bb4f6fbda8628bbe653804015b76c392fa5f208009
MD5 feffda75e818d95a3a0878d0968e7f43
BLAKE2b-256 de9ee7856beede7f8e6c5616ea0b692b279295febbdf301abb48dcd3b05424fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotyledon-2.2.0.tar.gz:

Publisher: release.yml on sileht/cotyledon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cotyledon-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: cotyledon-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cotyledon-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 130c04c339a2f94f482135c10dcfc83c7f7b4daca3c938a6101578b658b75017
MD5 8a196bc5f4a6b69a703d4e9ee11b405d
BLAKE2b-256 0933fb4a45f4bdde90934955a7c4244d4ffbedccaeaaa838f29714b45a2112e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotyledon-2.2.0-py3-none-any.whl:

Publisher: release.yml on sileht/cotyledon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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