GithubHelp home page GithubHelp logo

tea-n-tech / professional-python-exercises-3-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tea-n-tech/professional-python-exercises-2-githubcli

0.0 1.0 0.0 2.93 MB

Command Line Interface for GitHub as part of the professional python course

License: MIT License

Python 100.00%

professional-python-exercises-3-api's Introduction

Exercise3: API

Purpose

This is the third exercise for the professional python course. The purpose is to build an API for the CLI from exercise2

Task 3 - API

This task will be an advancement of the previous one by wrapping the functionality in an API. Create an API with the following routes:

  • GET /health/ping to check if the API is up (can be unauthenticated)
  • Require a GitHub token as authentication header and use this token for your API calls to GitHub within your API
  • GET /user to get details about the currently authenticated user
  • GET /user/stars to retrieve the amount of GitHub stars of all repos from the authenticated user
  • GET /user/status to get the current status of the authenticated user (see task 2)
  • POST /user/status to set the users status to drinking tea (see task 2)
  • GET /users/{username} to get data about the specified user
  • GET /users/{username}/stars to get the amount of total stars from all repos of the specified user

What is important?

  • Document your API endpoints (hint: if you do this right, it is done automatically)
  • The API needs to be wrapped and published as a docker image
  • Add a task command to start the docker image (makes life easier)

Create a python program to interact with GitHub and retrieve data. Add the following commands:

  • Count all stars of all repos of yourself, a specified user or an organization.
  • Print out details about yourself, a user or organization. Allow a nicely printed format as default and offer output as json too.
  • One of the following:
    • (easy) Modify your user description by adding a tea emoji and a heart.
    • (difficult) Set your user status (top-right when clicking on username) to a tea emoji with the message "Drinking Tea".

Focus points:

  • End-users will use your program so focus on usability
  • Integrate previous lessons as much as it makes sense

Quickstart

Installing

Promt task to get a list of the tasks availabe and go for one of the options. Use task api to start the api / webserver.

professional-python-exercises-3-api's People

Contributors

manuel1618 avatar codie3611 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.