Metadata-Version: 2.4
Name: nioflux
Version: 0.0.2
Summary: A lightweight asynchronous scalable TCP frame protocol server.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vortezwohl>=0.0.10
Dynamic: license-file

# *NioFlux*

*A lightweight asynchronous scalable TCP frame protocol server.*

## Installation

```
pip install -U nioflux
```

or

```
uv add -U nioflux
```

## Develop you tcp frame protocol server

```python
import asyncio

from nioflux import Server, StrDecode, StrEncode, PipelineStage


class MyProtocolHandler(PipelineStage):
    def __init__(self):
        super().__init__()

    async def __call__(self, data, extra, err, fire, io_ctx):
        print('Recv:', data)
        return data, extra, err, fire


async def main():
    server = Server([StrDecode(), MyProtocolHandler(), StrEncode()])
    print('Server: ', server)
    await server.run()


if __name__ == '__main__':
    asyncio.run(main())
```
