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.3.tar.gz (16.6 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.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fasio-0.2.3.tar.gz
  • Upload date:
  • Size: 16.6 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.3.tar.gz
Algorithm Hash digest
SHA256 2ec2cbc5f5561ff1d43624602e664adfa065c5dce99cd2e48b9fce002dda0dc4
MD5 bb046c560f6a009c505c9fb34fb93eca
BLAKE2b-256 da4719071800b76f5742a15945810226309798758e7eb5fe1fe2463ee6bc43af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fasio-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2e48d510d10e238c86956ae5366a5db4c4c89435c76a7de2d9079f6e9f4beb
MD5 e2e9316f3a8f051577ea43d9d25b0807
BLAKE2b-256 4bf3c0e6dc72b405d8de4f716f45cfb81b92e5e3ecc54c6b09231ca1fe57f521

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