Skip to main content

No project description provided

Project description

Aiomisc Entrypoint

Alternative way to run aiomisc entrypoint with processors added behavior to start and stop events of entrypoint and custom query logger.

Basic usage

from aiomisc_entrypoint import Entrypoint

ep = Entrypoint()
ep.clear_environ()
ep.change_user()
ep.system_signals_listener()
ep.register_services_in_context()
ep.first_start_last_stop()

ep.run_forever()

Extended usage

from signal import SIGINT, SIGTERM, SIGKILL
from aiomisc import Service
from aiomisc_entrypoint import Entrypoint

class TestService(Service):
    
    async def start(self):
        ...

    
async def main():
    ...


services = (
    TestService(context_name='svc1'),
    TestService(context_name='svc2'),
)
    
ep = Entrypoint(*services)
ep.clear_environ(lambda x: x.startwith('APP_'))
ep.change_user('user')
ep.system_signals_listener(SIGINT, SIGTERM, SIGKILL)
ep.register_services_in_context()
ep.first_start_last_stop()

ep.run_until_complete(main())

Release Notes:

v1.0.1

  • fix error with set loop for asyncio.Event in SysSignalListener

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

aiomisc_entrypoint-1.2.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

aiomisc_entrypoint-1.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file aiomisc_entrypoint-1.2.0.tar.gz.

File metadata

  • Download URL: aiomisc_entrypoint-1.2.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.12 Darwin/22.5.0

File hashes

Hashes for aiomisc_entrypoint-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8b13df6a408be1d01fe8d185e106038ce46e243cce3c20ae1d29d742b524a0e4
MD5 4b383555ed27127ec02b5c61b240f01d
BLAKE2b-256 c76eca92f96d2875d55e52a356993c42e9afa8446409503d7d1d1dd4a3e1109d

See more details on using hashes here.

File details

Details for the file aiomisc_entrypoint-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aiomisc_entrypoint-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b82953c1b42d134b3784454ca93c669bb7ae61d2db5262cd703b05d66dcf68a6
MD5 d3cca07bc007dac7571764585edb81f2
BLAKE2b-256 1ff02e42fc672949829e648e11771598d6f30e96a641d6f1c7df23f5a00464e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page