A Python library for GitHub API integration. Retrieve user info, repositories, and more. Simplify GitHub-related tasks effortlessly.
Project description
git-user
Purpose of the Package
A Python library for GitHub API integration. Retrieve user info, repositories, and more. Simplify GitHub-related tasks effortlessly.
Features
- ------List of functions------
- format_username(username)
- confirm_username(username)
- get_response(username)
- full_name(username)
- twitter(username)
- repos(username)
- bio(username)
- location(username)
- repo_count(username)
- followers_count(username)
- following_count(username)
- joined_date(username)
- confirm_token(username, token)
- create_repo(username, token, repo_name)
Dependencies
Python >3
Request pip install requests
Getting Started
The package can be found on pypi hence you can install it using pip
Installation
pip install git_user23
How to use
List of functions
format_username(username) This function removes leading and trailing spaces from the given username.
>>> from git_user23 import *
>>> format_username(" samuelogboye")
'samuelogboye'
>>> format_username(" samuelogboye ")
'samuelogboye'
confirm_username(username) Checks if a given username is valid on GitHub.
>>> from git_user23 import *
>>> confirm_username("samuelogboye")
True
>>> confirm_username("samuelogboy")
False
get_response(username) Retrieves all user information from GitHub API and returns it as a dictionary.
>>> from git_user23 import *
>>> get_response("samuelogboye")
info
full_name(username) Retrieves the full name of the user
>>> from git_user23 import *
>>> full_name("samuelogboye")
'Samuel Ogboye'
twitter(username) Retrieves the twitter username of a user
>>> from git_user23 import *
>>> twitter("samuelogboye")
'samuel_ogboye'
repos(username) Retrieves a list of all repositories owned by the user.
>>> from git_user23 import *
>>> repos("samuelogboye")
list of repo
bio(username) Retrieves the bio of the user
>>> from git_user23 import *
>>> bio("samuelogboye")
'Software Engineer || Open Source || Technical Writer || C || Python'
location(username) Retrieves the location of the user.
>>> from git_user23 import *
>>> location("samuelogboye")
'Nigeria'
repo_count(username) Retrives the count of public repositories owned by the user.
>>> from git_user23 import *
>>> repo_count("samuelogboye")
30
followers_count(username) Retrieves the count of followers of the user.
>>> from git_user23 import *
>>> followers_count("samuelogboye")
75
following_count(username) Retrieves the count of users that the user is following.
>>> from git_user23 import *
>>> following_count("samuelogboye")
64
joined_date(username) Retrieves the date when the user joined GitHub.
>>> from git_user23 import *
>>> joined_date("samuelogboye")
'2023-02-16'
confirm_token(username, token) Confirms if both username and token are valid. Returns True or False
>>> from git_user23 import *
>>> confirm_token("samuelogboye", *********)
False
create_repo(username, token, repo_name) Creates a public GitHub repository instantly with a README file and returns True if successful.
>>> from git_user23 import *
>>> create_repo("samuelogboye", "******", "testing")
True
Contribution
Contributions are welcome Notice a bug, let us know. Thanks
Author
- Main Maintainer: Samuel Ogboye
- Jesus Saves
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git-user23-0.0.3.tar.gz.
File metadata
- Download URL: git-user23-0.0.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.12 Linux/6.2.0-31-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29e8131ce9cf75f660f0ee9ea75ef7cfee38b022b268b6b76c4d137e78dfe22
|
|
| MD5 |
6c1b41b0c3e42ee7ace019a8382f2d09
|
|
| BLAKE2b-256 |
951508d80695df81d66108bd9b0c8fdfeddafc89a46def141743ec815cc967b0
|
File details
Details for the file git_user23-0.0.3-py3-none-any.whl.
File metadata
- Download URL: git_user23-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.12 Linux/6.2.0-31-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
910021821ff7db75a51273cad106dbb89502ec2e65a318d4c8aaf2e86e32188a
|
|
| MD5 |
a97ed189b698871934db3889e13b2a2b
|
|
| BLAKE2b-256 |
832db02fea57e76b8918ebd51880f6fe310d58f8956ecf9375a49ba2435b0381
|