Giter Site home page Giter Site logo

async-exercise's Introduction

PyYYC: Async Web Client

This is a skeleton for a programming assignment to explore an asynchronous Web client written using Twisted or asyncio.

Must use Python3.

Getting Started

To create a virtualenv and install all requirements:

python3 -m venv venv3
source venv3/bin/activate
python3 -m pip install -r requirements.txt

This will install both treq and aiohttp.

Start with either main_tx.py or main_aio.py depending upon whether you want to use Twisted or asyncio (if you finish, try the other framework).

The Assignment

  1. Refactor: make a async def fetch(url) function

  2. List all py-yyc repos

  1. discover the SHA1 of the most-recent commit of each repo
  1. bonus: use authentication

  2. bonus: determine wall-clock run-time of your program (compare between parallel / non-parallel if you can)

Note: without logging in, it's possible we'll hit the rate-limits. If that happens, you can use these URIs instead:

For "py-yyc/repos" endpoint:

https://raw.githubusercontent.com/py-yyc/async-exercise/master/data/repos.json

For "{repo}/commits" endpoint:

https://raw.githubusercontent.com/py-yyc/async-exercise/master/data/{repo}_commits.json

...so for the "todos_app" repository that would be: https://raw.githubusercontent.com/py-yyc/async-exercise/master/data/todos_app_commits.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.