Skip to main content

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:
                repo = await gist.owner.repos_url.get()[0]
            except AttributeError:
                print("{}: Gist has no owner".format(gist))
            except IndexError:
                print("{}: {0.owner.login} has no repositories".format(gist))
            print("{}: {0.owner.login} {} {1.stargazers_count}".format(
                gist, repo

loop = asyncio.get_event_loop()

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for napper, version 0.1a1
Filename, size File type Python version Upload date Hashes
Filename, size napper-0.1a1-py2.py3-none-any.whl (11.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size napper-0.1a1.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page