Skip to content

Commit 72a2530

Browse files
committed
added the packages metadata
1 parent f638e11 commit 72a2530

7 files changed

Lines changed: 25 additions & 16 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include README.md

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "httpx", "python-decouple"]
3+
build-backend = "setuptools.build_meta"

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
httpx
22
python-decouple
3+
setuptools>=42

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from distutils.core import setup
2+
from setuptools import find_packages
23

34

45
def readme():
@@ -11,11 +12,12 @@ def readme():
1112
version="1.0.0",
1213
description="python sdk for interacting with thepeer payment processing infrastructure",
1314
author="Osagie Iyayi",
14-
packages=["pythepeer"],
15+
packages=find_packages(),
1516
author_email="iyayiemmanuel1@gmail.com",
1617
url="https://github.com/thepeerstack/python-sdk",
1718
license="MIT",
1819
install_requires=["httpx", "python-decouple"],
20+
include_package_data=True,
1921
classifiers=[
2022
"Development Status :: 5 - Production/Stable",
2123
# Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable"
@@ -32,8 +34,7 @@ def readme():
3234
"Programming Language :: Python :: 3.10",
3335
"Topic :: Software Development :: Libraries",
3436
],
35-
long_description="python sdk(API Wrapper) for interacting with thepeer \
36-
payment processing infrastructure",
37+
long_description=readme(),
3738
keywords=["python", "fintech", "peer-to-peer"],
3839
zip_safe=False,
3940
)

thepeer/main.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import hashlib
22
import hmac
33
import json # type: ignore
4+
import os
5+
import sys
46

5-
import httpx
6-
from decouple import config # type: ignore
7-
from utils.constants import BASE_URL # type: ignore
8-
from utils.exceptions.handleErrors import SwitchErrorStates # type: ignore
7+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
8+
9+
10+
import httpx # noqa: E402
11+
from decouple import config # noqa: E402
12+
from utils.constants import BASE_URL # noqa: E402
13+
from utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402
914

1015

1116
class ThePeerInit:
@@ -249,19 +254,19 @@ def refund_transaction(self, transaction_id, reason):
249254

250255

251256
# test function
252-
thepeer = ThePeerInit(config("PEER_SECRET_KEY"))
253-
test = thepeer.index_user("Osagie Iyayi", "iyayiemmanuel1@gmail.com", "iyayiemmanuel1@gmail.com")
257+
peer = ThePeerInit(config("PEER_SECRET_KEY"))
258+
test = peer.index_user("Osagie Iyayi", "iyayiemmanuel1@gmail.com", "iyayiemmanuel1@gmail.com")
254259

255-
get = thepeer.update_user(
260+
get = peer.update_user(
256261
"3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd",
257262
identifier="iyayiemmanuel1@gmail.com",
258263
name="Osagie Iyayi",
259264
email="iyayiemmanuel1@gmail.com",
260265
)
261266

262267
# get = thepeer.all_users()
263-
charge = thepeer.authorize_direct_charge("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", "failed")
264-
view = thepeer.view_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd")
268+
charge = peer.authorize_direct_charge("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", "failed")
269+
view = peer.view_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd")
265270
# print(test)
266271
# print(view)
267272
# print(get)
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import unittest
2+
from thepeer import main # type: ignore
23

3-
from thepeer.main import ThePeerInit
4-
5-
6-
thepeer_test_suites = ThePeerInit("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")
4+
thepeer_test_suites = main.ThePeerInit("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")
75

86

97
class ThePeerInitMethods(unittest.TestCase):

0 commit comments

Comments
 (0)