GithubHelp home page GithubHelp logo

hasaan21 / flask-gist-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13 KB

Gistapi is a simple HTTP API server implemented in Flask for searching a user's public Github Gists.

Dockerfile 5.25% Python 94.75%

flask-gist-api's Introduction

gistapi

Gistapi is a simple HTTP API server implemented in Flask for searching a user's public Github Gists. The gistapi code in this repository has been left incomplete for you to finish.

Challenge

The existing code already implements most of the Flask boilerplate for you. The main functionality is left for you to implement. The goal is to implement an endpoint that searches a user's Gists with a regular expression. For example, I'd like to know all Gists for user justdionysus that contain the pattern import requests. There is also a failing test that should pass once you've successfully implemented the search process (and should illustrate the expected format of the response). The code in gistapi.py contains some comments to help you find your way.

To complete the challenge, you'll have to write some HTTP queries from Gistapi to the Github API to pull down each Gist for the target user. Please don't use a github API client (i.e. using an HTTP request library like requests or aiohttp or urllib3 is fine but not PyGithub or similar).

There are also a number of places in the code marked # BONUS where additional code would yield a more robust or performant service. If you finish the above quickly, feel free to investigate these added features or anything else you think might make for an interesting demo. Please don't work on the additional optional features before the main task is complete.

Running the app

# Directly
python -m gistapi.gistapi

# Via gunicorn
gunicorn gistapi.gistapi:app

# Via Docker
docker build . -t flask-app
docker run -p 8000:8000 flask-app

# Via docker-compose
docker-compose up

flask-gist-api's People

Contributors

hasaan21 avatar

Watchers

 avatar

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.