GithubHelp home page GithubHelp logo

professional-python's Introduction

Professional Python

Learn to code professional Python.

Requirements

  • Python Basics
  • Git Basics
  • GitHub/GitLab/Bitbucket Basics
  • Linux/Windows Commandline Basics (Linux recommended)

Tasks

Task 1 - Weather Data

Create a python program to fetch and print weather data:

  • Start with a simple script
  • Get weather data for the past and/or future 3 days
  • Output the weather data to the console
  • As weather data choose temperature and/or rainwater

Important

  • Do a pull request to make your submission in your repo
  • Find someone to review your code (you can use our discord)

Task 2 - GitHub CLI

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

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)

Lessons

  • Lesson 1
    • Package Management
  • Lesson2
    • Linting
    • Formatting
    • Typechecks
    • Commands with Task
  • Lesson 3
    • Gitignore
  • Lesson 4
    • Licenses
  • Lesson 5
    • Continuous Integration (CI)
    • GitHub Actions
  • Lesson 6
    • Pre-commit hooks (optional)
  • Lesson 7
    • Unit-Tests
  • Lesson 8
    • Docs generation
  • Lesson 9
    • Changelog and commit messages
  • Lesson 10
    • Command Line Interfaces (CLI)
  • Lesson 11
    • Releases git-flow
  • Lesson 12
    • API
  • Lesson 13
    • Docker

professional-python's People

Contributors

codie3611 avatar manuel1618 avatar

Stargazers

Abdulaziz Alajlani avatar Jorge Alarcon avatar Damian avatar Jerry Wu avatar adnene guessoum avatar rao avatar Jitendra Kumar avatar  avatar Jobin John avatar  avatar

Watchers

 avatar Jitendra Kumar avatar  avatar Kostas Georgiou avatar  avatar Jobin John avatar

professional-python's Issues

Change CLI main file

The current cli main file is __main__.py. This blocks the use of poetry run deathstar. Move __main__.py to main.py and explicitly specify it without a main function in pyproject.toml.

deprecated --dev option and first taskfile.yaml without uppercase

(I'm mainly opening an issue to see how it's done)

playing around in the third lesson on linting and formatting, I got a warning saying that "--dev" is deprecated and to use :
"poetry add flake9 pylint --group dev "

also the first taskfile.yaml must be written with an uppercase "Taskfile.yaml" which wasn't mentionned in the beginning of the README (it is after however).

Thx for the lessons :)

flake9 config options don't work

Some config options of flake9 don't work as it seems. We should migrate to a classical config file for flake8 and drop flake9.

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.