python的rest客户机

napper的Python项目详细描述


#打盹儿

异步的rest框架。

目前处于实验阶段。使用风险自负。

importasynciofromnapperimportapisasyncdefgetstargazers():"""Print the most popular repository of the authors of
    the most recent gists from github."""withapis.github()asgithub:gists=github.gists.get()asyncforgistingists:try:repo=awaitgist.owner.repos_url.get()[0]exceptAttributeError:print("{0.id}: Gist has no owner".format(gist))continueexceptIndexError:print("{0.id}: {0.owner.login} has no repositories".format(gist))continueprint("{0.id}: {0.owner.login} {1.name} {1.stargazers_count}".format(gist,repo))loop=asyncio.get_event_loop()loop.run_until_complete(getstargazers())

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
提交的java引用不明确:ExecutorService中的提交(可调用)和ExecutorService中的方法提交(可运行)匹配   java Get()和Set()在多个@Test、Selenium WebDriver之间   java更改同一会话中的entitymanager数据源   java为不同的日志文件配置不同的JDK日志格式   JavaSpring从JSON响应到网页   java IN子句在PreparedStatement上仅返回1行   java在使用数据提供程序时使用Testng优先级   如何在java中实现ketama算法?   java弹出窗口宽度和高度=0   java JLayeredPane未使用JFrame调整大小   将iCalendar DateTime转换为Java日期对象   java Fibonacci堆问题   java如何在spring数据jpa中映射友元请求实体   java Instanceof for generic with<?>或者没有<?>   java Hibernate回调用于许多联接表操作?