genesis

Implementation of FreeSWITCH Event Socket protocol with asyncio

https://github.com/otoru/genesis

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

esl freeswitch integration telephony
Last synced: 6 months ago · JSON representation

Repository

Implementation of FreeSWITCH Event Socket protocol with asyncio

Basic Info
Statistics
  • Stars: 33
  • Watchers: 4
  • Forks: 12
  • Open Issues: 2
  • Releases: 22
Topics
esl freeswitch integration telephony
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Security

README.md

Genesis

Tests badge 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.
  • Extensible and Customizable: Easily extend and customize the library to fit your needs.

Installation

Install Genesis using pip:

bash pip install genesis

Quickstart

Inbound Socket Mode

```python 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

```python 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

```python import asyncio from genesis import Outbound

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

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

asyncio.run(app.start()) ```

Documentation

Full documentation is available on the documentation website.

To preview the docs locally, install Hugo and run:

bash hugo server --source docs --disableFastRender

Running Tests

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

bash 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
RL/
RL
Dongwoon
Dongwoon Kim

License

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

Owner

  • Name: Vitor Hugo
  • Login: Otoru
  • Kind: user
  • Location: Brazil

SRE & VoIP firefighter 🔥

GitHub Events

Total
  • Create event: 10
  • Release event: 5
  • Issues event: 9
  • Watch event: 15
  • Delete event: 4
  • Issue comment event: 16
  • Push event: 34
  • Gollum event: 2
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 5
Last Year
  • Create event: 10
  • Release event: 5
  • Issues event: 9
  • Watch event: 15
  • Delete event: 4
  • Issue comment event: 16
  • Push event: 34
  • Gollum event: 2
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 5

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 17
  • Total Committers: 2
  • Avg Commits per committer: 8.5
  • Development Distribution Score (DDS): 0.471
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Vitor c****o@v****v 9
Vitor Hugo v****v@g****m 8
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 16
  • Total pull requests: 30
  • Average time to close issues: 5 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 6
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.6
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 4
  • Pull requests: 19
  • Average time to close issues: 7 days
  • Average time to close pull requests: 2 days
  • Issue authors: 3
  • Pull request authors: 3
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.95
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • Otoru (10)
  • nativegold (2)
  • marcelojcaraujo (1)
  • Netzvamp (1)
  • enesgur (1)
  • srenat (1)
Pull Request Authors
  • Otoru (21)
  • Netzvamp (11)
  • dependabot[bot] (4)
Top Labels
Issue Labels
enhancement (5) bug (3) good first issue (2) help wanted (1)
Pull Request Labels
dependencies (4) enhancement (3) codex (3) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 8,852 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 19
  • Total maintainers: 1
pypi.org: genesis

Implementation of FreeSWITCH Event Socket protocol with asyncio

  • Versions: 19
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 8,852 Last month
Rankings
Dependent repos count: 9.0%
Dependent packages count: 10.0%
Average: 12.6%
Downloads: 13.7%
Forks count: 14.2%
Stargazers count: 16.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • atomicwrites 1.4.0 develop
  • attrs 21.4.0 develop
  • black 22.1.0 develop
  • click 8.0.4 develop
  • colorama 0.4.4 develop
  • coverage 6.3.2 develop
  • distlib 0.3.4 develop
  • filelock 3.6.0 develop
  • importlib-metadata 4.11.3 develop
  • iniconfig 1.1.1 develop
  • mock 4.0.3 develop
  • mypy-extensions 0.4.3 develop
  • packaging 21.3 develop
  • pathspec 0.9.0 develop
  • platformdirs 2.5.1 develop
  • pluggy 1.0.0 develop
  • py 1.11.0 develop
  • pyparsing 3.0.7 develop
  • pytest 7.1.0 develop
  • pytest-asyncio 0.18.2 develop
  • pytest-cov 3.0.0 develop
  • six 1.16.0 develop
  • toml 0.10.2 develop
  • tomli 2.0.1 develop
  • tox 3.24.5 develop
  • typed-ast 1.5.2 develop
  • typing-extensions 4.1.1 develop
  • virtualenv 20.13.3 develop
  • zipp 3.7.0 develop
pyproject.toml pypi
  • black ^22.1.0 develop
  • mock ^4.0.3 develop
  • pytest ^7.1.0 develop
  • pytest-asyncio ^0.18.2 develop
  • pytest-cov ^3.0.0 develop
  • tox ^3.24.5 develop
  • python >=3.7,<4.0
.github/workflows/pypi.yml actions
  • JRubics/poetry-publish v1.10 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • snok/install-poetry v1 composite