Skip to main content

A fast asynchronous coroutine executor for asynchronous programming and fast I/O.

Project description

My Project Logo

fasio

A Truly Asynchronous Library for Coroutine Scheduling


Overview

fasio is an advanced asynchronous I/O library designed to simplify the development of high-performance network applications. It leverages the power of coroutines to provide a truly asynchronous programming model, allowing you to manage tasks efficiently without blocking operations. With fasio, you can create responsive applications that scale effortlessly.

Key Features

  • Truly Asynchronous: Supports async-await syntax for writing non-blocking code, allowing for efficient I/O operations.
  • Robust Event Loop: A fast and reliable event loop for managing asynchronous tasks and socket operations.
  • Cross-Thread Notifications: Built-in mechanisms for receiving notifications from other threads and processes.
  • Easy Socket Handling: Simplifies asynchronous socket programming, making it easy to build servers and clients.
  • Modular Design: Designed to integrate seamlessly into existing applications, enhancing functionality without major refactoring.

Installation

To install fasio, use pip:

pip install fasio

Usage

fasio is designed for ease of use. Below is a simple example of how to create a basic TCP echo server using fasio's features.

Example: Asynchronous TCP Echo Server

from fasio import start, spawn, socket

async def handle_client(client):
    while True:
        data = await client.recv(100)

        if not data:
            break

        await client.send(data)

async def main():
    serverfd = socket(socket.AF_INET, socket.SOCK_STREAM)
    serverfd.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR)
    serverfd.bind(('localhost', 8080))
    serverfd.listen(socket.SOMAXCONN)

    while True:
        client, addr = await serverfd.accept()

        spawn(handle_client(client))

start(main())

Explanation

In this example, we create a TCP server that listens on localhost at port 8080. When a client connects, a new coroutine is spawned to handle the client’s requests. The server echoes back any data received, demonstrating fasio's capabilities for handling asynchronous socket operations.


Contributing

Contributions to fasio are welcome! If you’d like to help improve the library, please fork the repository and submit a pull request. Feel free to report issues or request features through the issue tracker.

How to Contribute

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with clear messages.
  4. Push your branch and submit a pull request.

License

fasio is released under the MIT License. See the LICENSE file for more details.


Contact

For any questions or feedback, please reach out via iadityanath8@gmail.com.


With fasio, harness the power of asynchronous programming to create efficient, high-performance applications. Start building today and explore the possibilities!

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

fasio-0.2.4.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

fasio-0.2.4-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file fasio-0.2.4.tar.gz.

File metadata

  • Download URL: fasio-0.2.4.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for fasio-0.2.4.tar.gz
Algorithm Hash digest
SHA256 7dd55aa9388dc8881577da39adbde728d5b77b33857b20073ed3deb1c53666d9
MD5 4090f9f92225d6eb57237ecc9960ea78
BLAKE2b-256 b275e432512a6819395c1fa797215496fc2a0674be4e9a546e1098e2371584ac

See more details on using hashes here.

File details

Details for the file fasio-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: fasio-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for fasio-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ce59412eb3093815537c7fb5a83c8e15dcd7c4ad758a0be05787897c76d2a2f3
MD5 7224a5716497df3a1fb16c42307290d3
BLAKE2b-256 974388ad98fe4952621e326fb6a908b6b94d7976bfea249bd2e5ccc062eec495

See more details on using hashes here.

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