It was pointed out that not all users will have GitHub usernames, or may make mistakes when entering their username. As this username is used to populate cookiecutter files, we should check that the name is valid, and raise a warning if not.
I'm thinking that this could be done with requests:
import requests
if not requests.get("http://www.github.com/tomasbeuzen").status_code < 400:
# raise a warning
This adds ~ 2 seconds onto the post generation workflow, I'll try it out and see how it goes...
It was pointed out that not all users will have GitHub usernames, or may make mistakes when entering their username. As this username is used to populate cookiecutter files, we should check that the name is valid, and raise a warning if not.
I'm thinking that this could be done with
requests
:This adds ~ 2 seconds onto the post generation workflow, I'll try it out and see how it goes...