Skip to main content

summon_process

Current status: work in progress. The code is lacking proper documentation and is broken on Python 3.3.

https://travis-ci.org/mlen/summon_process.png?branch=master

Python process orchestration library.

About

As developers we have to work on project that rely on multiple processes to run their tests suites. Sometimes these processes need some time to boot.

The simple (and wrong) solution is to add time.sleep and pretend that it works. Unfortunately there is no way the estimate the amount of time to sleep and not loose too much time.

summon_process is an attempt to solve this problem. What you can see below is an example test that waits for a HTTP server to boot, and then it checks whether the returned status is OK.

from unittest import TestCase
from summon_process.executors import HTTPCoordinatedExecutor
from summon_process.utils import orchestrated
from httplib import HTTPConnection, OK


class TestServer(TestCase):
    def test_it_works(self):
        executor = HTTPCoordinatedExecutor("./server",
                                           url="http://localhost:8000/")

        with orchestrated(executor):
            conn = HTTPConnection("localhost", 8000)
            conn.request('GET', '/')
            assert conn.getresponse().status is OK

The server command in this case is just a bash script that sleeps for some time and then launches the builtin SimpleHTTPServer on port 8000.

Author

The project was developed by Mateusz Lenik.

License

summon_process is licensed under LGPL license, version 3.

Contributing and reporting bugs

Source code is available at: mlen/summon_process. Issue tracker is located at GitHub Issues. Projects PyPi page.

Metadata

Release files for summon_process 0.1.3

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

Source distribution (sdist)

Source distribution for summon_process 0.1.3
File Size Uploaded Provenance
summon_process-0.1.3.tar.gz 6.6 kB Without provenance Details

Release files / summon_process-0.1.3.tar.gz

Download URL summon_process-0.1.3.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
64b82a3ca89ccbaf4a1c193805fdeba266ed50246c267a68d42ed9305c056088
BLAKE2b-256 checksum
How to use checksums
9f3c9d10604d810ea544d82d624083cde58cf16aee783d7050e581e95d3fd0a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for summon_process 0.1.3

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.

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