Name | ap2p JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | A simple peer-to-peer network using asyncio |
upload_time | 2025-02-15 21:59:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.4 |
license | None |
keywords |
asyncio
networking
p2p
peer to peer
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ap2p
## Overview
`ap2p` is a package designed to facilitate peer-to-peer communication and data exchange. It provides a robust and efficient framework for building decentralized applications.
## Features
- No-nonsense API for peer-to-peer communication
- Asynchronicity with modern python3 async / await syntax
- Threading based on asyncio
- Ease of use with clear documentation and examples
- Easily extensible to accommodate various use cases
## Installation
To install the package, use the following command:
```bash
pip install ap2p
```
## Usage
Here's a basic example of how to use `ap2p` to start three interconnected nodes on localhost:
```python
from asyncio import create_task, gather, run
from ipaddress import ip_address
from ap2p import Address, Node
LOCALHOST = ip_address("127.0.0.1")
PEERS = [
Address(LOCALHOST, 8000),
Address(LOCALHOST, 8001),
Address(LOCALHOST, 8002),
]
for peer in peers:
node = Node(address=peer)
create_task(node.start(peers=peers))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ap2p",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.4",
"maintainer_email": null,
"keywords": "asyncio, networking, p2p, peer to peer",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/bb/b4/c765a849b7d7438baad33697d8d34985ebcafae92fe2207ff17b512105fd/ap2p-0.0.1.tar.gz",
"platform": null,
"description": "# ap2p\n\n## Overview\n`ap2p` is a package designed to facilitate peer-to-peer communication and data exchange. It provides a robust and efficient framework for building decentralized applications.\n\n## Features\n- No-nonsense API for peer-to-peer communication\n- Asynchronicity with modern python3 async / await syntax\n- Threading based on asyncio\n- Ease of use with clear documentation and examples\n- Easily extensible to accommodate various use cases\n\n## Installation\nTo install the package, use the following command:\n```bash\npip install ap2p\n```\n\n## Usage\nHere's a basic example of how to use `ap2p` to start three interconnected nodes on localhost:\n```python\nfrom asyncio import create_task, gather, run\nfrom ipaddress import ip_address\n\nfrom ap2p import Address, Node\n\n\nLOCALHOST = ip_address(\"127.0.0.1\")\n\nPEERS = [\n Address(LOCALHOST, 8000),\n Address(LOCALHOST, 8001),\n Address(LOCALHOST, 8002),\n]\n\n\nfor peer in peers:\n node = Node(address=peer)\n create_task(node.start(peers=peers))\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple peer-to-peer network using asyncio",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/aimir/ap2p",
"Issues": "https://github.com/aimir/ap2p/issues"
},
"split_keywords": [
"asyncio",
" networking",
" p2p",
" peer to peer"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d4c1de826050a80c6a03de7ab0f1b6933d7674229b5a848d3a53e3b35f5b08db",
"md5": "abda69530f66bee270c66d4e31fe09a8",
"sha256": "daad700d47148d46fbd2dc36362ec14cc8b1f0f9d57fd793b830d77b8b11decc"
},
"downloads": -1,
"filename": "ap2p-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "abda69530f66bee270c66d4e31fe09a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.4",
"size": 8706,
"upload_time": "2025-02-15T21:59:18",
"upload_time_iso_8601": "2025-02-15T21:59:18.011452Z",
"url": "https://files.pythonhosted.org/packages/d4/c1/de826050a80c6a03de7ab0f1b6933d7674229b5a848d3a53e3b35f5b08db/ap2p-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bbb4c765a849b7d7438baad33697d8d34985ebcafae92fe2207ff17b512105fd",
"md5": "9034075f6e554eff3917a4ee01884e96",
"sha256": "c1dc97473b6ddad5fec21ca2e2dd175565cdd41841bbe1f744000dd4c2a6429f"
},
"downloads": -1,
"filename": "ap2p-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "9034075f6e554eff3917a4ee01884e96",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.4",
"size": 10580,
"upload_time": "2025-02-15T21:59:20",
"upload_time_iso_8601": "2025-02-15T21:59:20.243439Z",
"url": "https://files.pythonhosted.org/packages/bb/b4/c765a849b7d7438baad33697d8d34985ebcafae92fe2207ff17b512105fd/ap2p-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-15 21:59:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aimir",
"github_project": "ap2p",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ap2p"
}