Skip to content

Commit 3c30516

Browse files
committed
add: PyPI
1 parent 84b4c4e commit 3c30516

File tree

8 files changed

+69
-14
lines changed

8 files changed

+69
-14
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,5 @@ dmypy.json
131131

132132
# project
133133
*.sh
134+
135+
.idea/

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
1-
# githubapps.py
1+
# githubapps.py
2+
3+
A Python wrapper for the Github Apps API
4+
5+
# installing
6+
Install and update using pip:
7+
8+
`pip install githubapps.py`
9+
10+
A simple example.
11+
12+
```python
13+
import githubapps
14+
def main():
15+
with open('env/private.key', 'rb') as f_private:
16+
private_key = f_private.read()
17+
with open('env/app_id.key', 'r') as f_app_id:
18+
app_id = f_app_id.read()
19+
with open('env/installation_id.key', 'r') as f_installation_id:
20+
installation_id = f_installation_id.read()
21+
client_secret = private_key
22+
auth = githubapps.Auth(app_id, installation_id, client_secret)
23+
access_token = auth.get_access_token()
24+
print(access_token)
25+
```

example/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PyJWT
2+
aiohttp
3+
requests
4+
cryptography
5+
PyGithub

githubapp/__init__.py renamed to githubapps/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:copyright: (c) 2022 by the authors and contributors (see AUTHORS).
66
:license: MIT, see LICENSE for more details.
77
"""
8-
__title__ = 'githubapp'
8+
__title__ = 'githubapps'
99
__author__ = 'RTa-technology'
1010
__license__ = 'MIT'
1111
__copyright__ = 'Copyright 2022 by the authors and contributors (see AUTHORS)'
File renamed without changes.
File renamed without changes.

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PyJWT
22
aiohttp
33
requests
4-
cryptography
5-
PyGithub
4+
cryptography

setup.py

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1-
from setuptools import setup, find_packages
2-
3-
setup(
4-
name='githubapp',
5-
version='0.1.0',
6-
license='MIT',
7-
description='This is a wrapper for the Github Apps API.',
8-
author='RTa-technology',
9-
packages=["githubapp"],
10-
)
1+
2+
import re
3+
4+
import setuptools
5+
6+
version = ''
7+
with open('githubapps/__init__.py') as f:
8+
version = re.search(
9+
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
10+
11+
requirements = []
12+
with open('requirements.txt', 'r') as f:
13+
requirements = f.read().splitlines()
14+
15+
16+
with open('README.md', 'r') as f:
17+
long_description = f.read()
18+
19+
setuptools.setup(
20+
name='githubapps',
21+
version=version,
22+
license='MIT',
23+
description='This is a wrapper for the Github Apps API.',
24+
long_description_content_type='text/markdown',
25+
url='https://github.com/RTa-technology/githubapps.py',
26+
author='RTa-technology',
27+
packages=setuptools.find_packages(),
28+
install_requires=requirements,
29+
classifiers=[
30+
'Programming Language :: Python :: 3.8',
31+
'Programming Language :: Python :: 3.9',
32+
'License :: OSI Approved :: MIT License',
33+
'Operating System :: OS Independent',
34+
],
35+
)

0 commit comments

Comments
 (0)