Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Commit 4539301

Browse files
committed
🎉 Start
0 parents  commit 4539301

10 files changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build and publish to PyPI 📦
2+
on:
3+
release
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
- name: Install dependencies
13+
run: |
14+
python -m pip install --upgrade pip
15+
pip install setuptools wheel twine
16+
pip install -r requirements.txt
17+
- name: Build and publish
18+
env:
19+
TWINE_USERNAME: __token__
20+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
21+
run: |
22+
python setup.py sdist bdist_wheel
23+
twine upload dist/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
env/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Eliaz Bobadilla
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Whitespace-only changes.

githubapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file tells Python that this is a submodule

githubapi/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from githubapi.githubuser import run
2+
run()

githubapi/githubuser.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import sys
2+
import requests
3+
4+
5+
def get_username():
6+
return str(input("Username: "))
7+
8+
9+
def get_user_details(username):
10+
return requests.get(f"https://api.github.com/users/{username}").json()
11+
12+
13+
def print_data(user_details):
14+
print(user_details)
15+
16+
def run():
17+
username = get_username()
18+
user_details = get_user_details(username)
19+
print_data(user_details)
20+
21+
22+
if __name__ == "__main__":
23+
run()

githubapi/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "1.0.0"

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
certifi==2021.5.30
2+
chardet==4.0.0
3+
idna==2.10
4+
requests==2.25.1
5+
urllib3==1.26.5

setup.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from setuptools import setup
2+
from distutils.core import setup
3+
from githubapi.version import __version__
4+
5+
setup(
6+
name="githubapi",
7+
version=__version__,
8+
python_requires=">=3.6",
9+
description="A wrapper for the GitHub Api.",
10+
long_description=open("README.md").read(),
11+
long_description_content_type="text/markdown",
12+
author="UltiRequiem",
13+
author_email="eliaz.bobadilladev@gmail.com",
14+
url="https://github.com/UltiRequiem/githubapi",
15+
license="MIT",
16+
packages=["githubapi"],
17+
install_requires=["requests==2.25.1"],
18+
entry_points={"console_scripts": ["githubapi = githubapi.githubapi:main"]},
19+
classifiers=[
20+
"Programming Language :: Python",
21+
],
22+
)

0 commit comments

Comments
 (0)