A REST client for Python
Project description
# napper
A REST framework for asyncio.
Currently in experimental stage. Use at your own risk.
import asyncio
from napper import apis
async def getstargazers():
"""Print the most popular repository of the authors of
the most recent gists from github."""
with apis.github() as github:
gists = github.gists.get()
async for gist in gists:
try:
repo = await gist.owner.repos_url.get()[0]
except AttributeError:
print("{0.id}: Gist has no owner".format(gist))
continue
except IndexError:
print("{0.id}: {0.owner.login} has no repositories".format(gist))
continue
print("{0.id}: {0.owner.login} {1.name} {1.stargazers_count}".format(
gist, repo
))
loop = asyncio.get_event_loop()
loop.run_until_complete(getstargazers())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
napper-0.1a1.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file napper-0.1a1.tar.gz.
File metadata
- Download URL: napper-0.1a1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1101c08f706bb2e859f02ce1a5ef3201e7ca607cc389063d9906131baefbab9d
|
|
| MD5 |
2250ae131651814ad38e20ae013772d6
|
|
| BLAKE2b-256 |
3573947dc821f52fa7ffff78594458022995dde3bfd4bf5afea5d176a3ed2289
|
File details
Details for the file napper-0.1a1-py2.py3-none-any.whl.
File metadata
- Download URL: napper-0.1a1-py2.py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c00adba9ba9bb17d6937d672aff351c3c83df6c2e588d689b8f00c75409d12
|
|
| MD5 |
1699de85276034431f5c54a29c3ffa02
|
|
| BLAKE2b-256 |
fa6f17ca5360543ed51fcbc1ce2aaded17d83f500161a590bf6cc8744df256d9
|