Skip to main content

Genesis

Build badge License badge Pypi Version badge Pypi python version badge Pypi wheel badge

Genesis is a Python library designed to build asynchronous applications that interact with FreeSWITCH through the Event Socket Layer (ESL).

Features

  • Asynchronous by Design: Built with asyncio for high-performance, non-blocking I/O.
  • Inbound, Outbound, and Consumer Modes: Supports all major ESL modes for comprehensive FreeSWITCH integration.
  • Decorator-Based Event Handling: A simple and intuitive way to handle FreeSWITCH events.
  • OpenTelemetry Support: Built-in instrumentation for tracing connections and commands.
  • Extensible and Customizable: Easily extend and customize the library to fit your needs.

Installation

Install Genesis using pip:

pip install genesis

For better asyncio performance on Unix (Linux and macOS), use the optional uvloop extra: pip install genesis[uvloop]. See the Installation Guide for details.

Quickstart

Inbound Socket Mode

import asyncio
from genesis import Inbound

async def uptime():
    async with Inbound("127.0.0.1", 8021, "ClueCon") as client:
        return await client.send("uptime")

async def main():
    response = await uptime()
    print(response)

asyncio.run(main())

Consumer Mode

import asyncio
from genesis import Consumer

app = Consumer("127.0.0.1", 8021, "ClueCon")

@app.handle("HEARTBEAT")
async def handler(event):
    await asyncio.sleep(0.001)
    print(event)

asyncio.run(app.start())

Outbound Socket Mode

import asyncio
from genesis import Outbound

async def handler(session):
    await session.answer()
    await session.playback('ivr/ivr-welcome')
    await session.hangup()

app = Outbound(handler, "127.0.0.1", 5000)

asyncio.run(app.start())

Documentation

Full documentation is available on the documentation website.

To preview the docs locally, install Hugo and run:

hugo server --source docs --disableFastRender

Running Tests

Install development dependencies with Poetry and execute the test suite using tox:

poetry install
tox

How to Contribute

Contributions are welcome! Whether it's improving documentation, suggesting new features, or fixing bugs, your help is appreciated.

Please read our Contributing Guide and Code of Conduct to get started.

Contributors

Vitor
Vitor Hugo
Robert
Robert Lieback
Dongwoon
Dongwoon Kim

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Metadata

Release files for genesis 2026.10.18

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

Source distribution (sdist)

Source distribution for genesis 2026.10.18
File Size Uploaded Provenance
genesis-2026.10.18.tar.gz 64.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for genesis 2026.10.18
File Interpreter ABI Platform
genesis-2026.10.18-py3-none-any.whl Python 3 none any Details

Total release size: 145.2 kB

Release files / genesis-2026.10.18.tar.gz

Download URL genesis-2026.10.18.tar.gz
Size 64.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ad403a7e2fa2a05b6ac7d3ea9a5e1ab86357d7a259c67f44d0058406d4d0969e
BLAKE2b-256 checksum
How to use checksums
1bd4abf3487afdd3e79e93fa308b89e3840cf0a46388b5419fd3d7e27aca9e5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.10.2 Linux/6.17.0-1022-azure

Release files / genesis-2026.10.18-py3-none-any.whl

Download URL genesis-2026.10.18-py3-none-any.whl
Size 81.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbc347726a8056247042683d672aa9c5a13781b79fdf3eaf2bfc30701a33e523
BLAKE2b-256 checksum
How to use checksums
ba6d358cf38b63523372e03b1201d95d5eb4597635418d7082e5caff8b790c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.10.2 Linux/6.17.0-1022-azure

Security for genesis 2026.10.18

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.

Release history Release notifications | RSS feed

This release

2026.10.18 This release

2 release files 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