{"id":13937066,"url":"https://github.com/hivesolutions/netius","last_synced_at":"2026-04-10T18:04:19.895Z","repository":{"id":16313088,"uuid":"19062086","full_name":"hivesolutions/netius","owner":"hivesolutions","description":"Readable, simple and fast asynchronous non-blocking network apps","archived":false,"fork":false,"pushed_at":"2026-04-03T08:26:21.000Z","size":6243,"stargazers_count":118,"open_issues_count":16,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-04-03T08:29:17.834Z","etag":null,"topics":["asyncio","http","http2","library","net","wsgi"],"latest_commit_sha":null,"homepage":"http://netius.hive.pt","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hivesolutions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2014-04-23T08:16:49.000Z","updated_at":"2026-04-02T11:20:18.000Z","dependencies_parsed_at":"2023-11-21T18:27:38.436Z","dependency_job_id":"b3f55dc3-a491-4e78-b70f-33f7f81db334","html_url":"https://github.com/hivesolutions/netius","commit_stats":null,"previous_names":[],"tags_count":536,"template":false,"template_full_name":null,"purl":"pkg:github/hivesolutions/netius","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fnetius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fnetius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fnetius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fnetius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hivesolutions","download_url":"https://codeload.github.com/hivesolutions/netius/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fnetius/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31499193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","http","http2","library","net","wsgi"],"created_at":"2024-08-07T23:03:14.719Z","updated_at":"2026-04-10T18:04:19.888Z","avatar_url":"https://github.com/hivesolutions.png","language":"Python","readme":"# [![Netius](res/logo.png)](http://netius.hive.pt)\n\n**Fast and readable async non-blocking network apps**\n\nNetius is a Python network library that can be used for the rapid creation of asynchronous, non-blocking\nservers and clients. It has no dependencies, it's cross-platform, and brings some sample netius-powered\nservers out of the box, namely a production-ready WSGI server.\n\nSimplicity and performance are the main drivers of this project. The codebase adheres to rigorous\ncode standards and is extensively commented on. As far as performance is concerned, it aims to\nbe up to par with equivalent native implementations, where [PyPy](http://pypy.org) can\nprovide the extra boost to raise performance up to these standards.\n\nBear in mind that although netius is non-blocking, it will naturally still block if the operations\nperformed within the event loop are blocking, like reading or writing a file, which are both blocking\noperations in the Python standard library. Running multiple netius instances in parallel, and having\na fast server like [NGINX](http://nginx.org) acts as their reverse proxy, which is one way of minimizing the\nperceptibility of such blockages.\n\n## Installation\n\n```bash\npip install netius\n```\n\nOr download the source from [GitHub](https://github.com/hivesolutions/netius).\n\nNetius has no dependencies and is, therefore cross-platform. It's compatible with [PyPy](http://pypy.org),\nwith which its benefits of performance increase up to 1.5x - 2.5x faster in most environments when\ncompared with running it with the CPython interpreter.\n\n## Usage\n\n### WSGI Server\n\n```python\nimport netius.servers\n\ndef app(environ, start_response):\n    status = \"200 OK\"\n    contents = \"Hello World\"\n    content_l = len(contents)\n    headers = (\n        (\"Content-Length\", content_l),\n        (\"Content-Type\", \"text/plain\"),\n        (\"Connection\", \"keep-alive\")\n    )\n    start_response(status, headers)\n    yield contents\n\nserver = netius.servers.WSGIServer(app = app)\nserver.serve(port = 8080)\n```\n\n### HTTP Client\n\n#### Synchronous usage\n\n```python\nimport netius.clients\nresult = netius.clients.HTTPClient.get_s(\n    \"http://www.flickr.com/\",\n    asynchronous = False\n)\nprint(result[\"data\"])\n```\n\n#### Asynchronous usage\n\n```python\nimport netius.clients\n\ndef on_partial(client, parser, data):\n    print(data)\n\ndef on_message(client, parser, message):\n    netius.clients.HTTPClient.cleanup_s()\n\nnetius.clients.HTTPClient.get_s(\n    \"http://www.flickr.com/\",\n    callback = on_message,\n    on_data = on_partial\n)\n```\n\n### Test servers\n\nThe servers that come with netius out-of-the-box, can be tested through the command line:\n\n| Class           | Example                                               |\n| --------------- | ----------------------------------------------------- |\n| WSGIServer      | `python -m netius.servers.wsgi`                       |\n| FTPServer       | `python -m netius.servers.ftp`                        |\n| HelloServer     | `MESSAGE=\"Hello Netius\" python -m netius.extra.hello` |\n| FileServer      | `BASE_PATH=/ python -m netius.extra.file`             |\n| SMTPServer      | `python -m netius.servers.smtp`                       |\n| RelaySMTPServer | `python -m netius.extra.smtp_r`                       |\n\n## Learn more\n\n### Basic\n\n* [Configuration](doc/configuration.md) - how to configure your server/client\n* [Diagnostics](doc/diag.md) - built-in HTTP diagnostics server for runtime introspection\n\n### Advanced topics\n\nMore information can be found in the [Advanced Topics](doc/advanced.md) page.\n\n## License\n\nNetius is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).\n\n## Build Automation\n\n[![Build Status](https://app.travis-ci.com/hivesolutions/netius.svg?branch=master)](https://travis-ci.com/github/hivesolutions/netius)\n[![Build Status GitHub](https://github.com/hivesolutions/netius/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/netius/actions)\n[![Coverage Status](https://coveralls.io/repos/hivesolutions/netius/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/netius?branch=master)\n[![PyPi Status](https://img.shields.io/pypi/v/netius.svg)](https://pypi.python.org/pypi/netius)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)\n","funding_links":[],"categories":["WSGI Servers","资源列表","Python","Awesome Python"],"sub_categories":["WSGI 服务器","WSGI Servers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivesolutions%2Fnetius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhivesolutions%2Fnetius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivesolutions%2Fnetius/lists"}