EASY Python Project AUTOMATION **Create new repos using GITHUB API

    10
    11



    Hello Curious Coders! Welcome back to another video! đź‘‹ đź‘‹

    Today I am bringing you another Python automation project. In this video, you’ll learn how to automate the process of creating a new GitHub repository with Python using GitHub API. This is a really fun project to improve your scripting skills and to play around with different Python libraries and tools.

    I hope you guys enjoy it! Don’t forget to check the below links for more videos and Python resources! đź’Ş

    GITHUB LINKS:
    â–ş https://github.com
    â–ş https://docs.github.com/en/rest

    ▬▬▬▬▬▬ Recommended Videos ▬▬▬▬▬▬
    🤖 Starting with Python? 🤖
    â–ş Introduction to Python. What is it used for in 2020? https://youtu.be/cCsjxh9OcFo
    â–ş Python 3 installation on macOS + Overview https://youtu.be/rtQQzD0F7EU
    â–ş Python 3 installation on Windows + Overview https://youtu.be/-vIGlk6EbMM

    🤖 Try out some of these Python automation projects! 🤖
    â–ş How To Create a Twitter Bot in Python [Part 1] https://youtu.be/OoVDcNNHohY
    â–ş How To Create a Twitter Bot in Python [Part 2] https://youtu.be/RMRrZ1USrrY
    â–ş Amazon Product Tracking [Part1] https://youtu.be/5bWHeGI9Uf4
    â–ş Amazon Product Tracking [Part2] https://youtu.be/G8x7JENDNuA
    â–ş Cleaning up our downloads folder https://youtu.be/5idxowRxWW0

    ▬▬▬▬▬▬ Recommended Python Books ▬▬▬▬▬▬

    📚 Beginner Level 📚
    â–ş Python for Kids: https://amzn.to/3DHgyVi
    â–ş Python for Dummies: https://amzn.to/3qVojDs
    â–ş Python Crash Course: https://amzn.to/3l1JD6l
    â–ş Clean Code in Python: https://amzn.to/3FFpf2M

    📚 Intermediate Level 📚
    â–ş Fluent Python: https://amzn.to/3HNHmW7
    â–ş Automate the Boring Stuff with Python: https://amzn.to/3cCSpmH
    â–ş Python Data Science Handbook: https://amzn.to/3HK9b1O
    â–ş Mastering Python Networking: https://amzn.to/3FCglDh

    📚 Advanced Level 📚
    â–ş Natural Language Processing with Python: https://amzn.to/3oPYbHm
    â–ş Hands-on Machine Learning with Scikit-Learn, Keras & TensorFlow: https://amzn.to/30VPa7D
    â–ş Black Hat Python: Python Programming for Hackers and Pentesters: https://amzn.to/3cId8p6

    ⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

    ▬▬▬▬▬▬ COME SAY HI! ▬▬▬▬▬▬
    â–ş YouTube: https://youtube.com/c/CuriousCoding
    â–ş Instagram: https://instagram.com/CuriousCodingYT
    â–ş Twitter: https://twitter.com/CuriousCodingYT
    â–ş Facebook: https://facebook.com/CuriousCodingYT
    â–ş Github: https://github.com/CuriousCodingYT

    #python #pythonautomation #github

    source

    Previous articleInvoking AWS batch Job through Python Boto3 SDK and Passing arguments tutorial
    Next articlehadoop in hindi | Introduction of hadoop | What is Hadoop

    11 COMMENTS

    1. Even though my auth token is accepted and a repo is created on my github, each time I create a project, I still get a Github popup asking to login or provide the token once more. I've been trying to search for solutions but haven't found anything of something similar. I'm thinking it might be something with my auth token permissions. Any thoughts?

    2. Do you have any advice on how to create a repo under an organization that does not allow public repos. I can create a private repo, but I want to create an internal repo. I cannot find enough information on the arguments to pass into the post command to make the repo "internal" instead of "private".

    3. What do you do so that the code does not ask you for username and password when doing the push? I use your create_repo file and when executing it everything works but when it does the push it asks me for a username and password. I dont know if this is the problem, but when creating the token the options have some differences, for example, when i check the write packages option the repo part is blocked. (print attached https://ibb.co/GvfLRqp )

    4. I`m a new to python iam unable to pass variable args.name to payload . its giving error if i copy ur syntax .

      parser.add_argument("–name", "-n", type=str , dest="name ", required=True)

      if i pass as below it doesn't print the assigned variable .

      repo_name = args.namepayload = '{"name": " ' + repo_name ' " ,"private": true }'

      gives syntax error . SyntaxError: invalid syntax

      if I remove single quotes , only repo_name is being printed and not the value assigned to it .
      payload = '{"name": " + repo_name " ,"private": true }' gives {"name": " + repo_name " ,"private": false }