Skip to content

Commit 779a5c3

Browse files
committed
Prepared the module for PyPi release
1 parent 0f3a990 commit 779a5c3

4 files changed

Lines changed: 66 additions & 49 deletions

File tree

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ This Python library lets you connect to a mosparo installation and verify the su
2222
Install this library by using pip:
2323

2424
```text
25-
pip install mosparo
25+
pip install mosparo-api-client
2626
```
2727

2828
### Build from source
2929

30-
1. Build the package
30+
You need the module `build` to build the module from source.
31+
32+
1. Clone the repository
33+
2. Build the package
3134
```commandline
32-
python setup.py bdist_wheel
35+
python -m build
3336
```
34-
2. Install the package
37+
3. Install the package
3538
```commandline
36-
pip install dist/mosparo-1.0.0-py3-none-any.whl
39+
pip install dist/mosparo_api_client-1.0.0-py3-none-any.whl
3740
```
3841

3942
## Usage
@@ -52,15 +55,16 @@ pip install dist/mosparo-1.0.0-py3-none-any.whl
5255
```
5356
3. Include the library in your project
5457
```text
55-
pip install mosparo
58+
pip install mosparo-api-client
5659
```
5760
4. After the form is submitted, verify the data before processing it
61+
5862
```python
59-
from mosparo import Client
63+
from mosparo_api_client import Client
6064

6165
api_client = Client(host, public_key, private_key)
6266

63-
your_post_data = {} # This needs to be filled with the post data
67+
your_post_data = {} # This needs to be filled with the post data
6468

6569
mosparo_submit_token = your_post_data['_mosparo_submitToken']
6670
mosparo_validation_token = your_post_data['_mosparo_validationToken']
@@ -84,7 +88,7 @@ else:
8488
Create a new client object to use the API client.
8589

8690
```python
87-
from mosparo import Client
91+
from mosparo_api_client import Client
8892

8993
api_client = Client(host, public_key, private_key, verify_ssl)
9094
```

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "mosparo_api_client"
7+
version = "1.0.0"
8+
description = "Python API Client to communicate with mosparo."
9+
readme = "README.md"
10+
authors = [{ name = "mosparo Core Developers", email = "info@mosparo.io" }]
11+
license = { file = "LICENSE" }
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
"License :: OSI Approved :: MIT License",
15+
"Operating System :: OS Independent",
16+
"Programming Language :: Python :: 3.5",
17+
"Programming Language :: Python :: 3.6",
18+
"Programming Language :: Python :: 3.7",
19+
"Programming Language :: Python :: 3.8",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Topic :: Internet",
25+
]
26+
keywords = ["mosparo", "api-client", "spam-protection", "accessibility", "captcha"]
27+
dependencies = [
28+
"requests"
29+
]
30+
requires-python = ">=3.5"
31+
32+
[project.optional-dependencies]
33+
dev = ["pytest-runner", "requests-mock", "pip-tools"]
34+
35+
[project.urls]
36+
Website = "https://mosparo.io"
37+
GitHub = "https://github.com/mosparo/python-api-client"

requirements.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile pyproject.toml
6+
#
7+
certifi==2022.12.7
8+
# via requests
9+
charset-normalizer==3.1.0
10+
# via requests
11+
idna==3.4
12+
# via requests
13+
requests==2.29.0
14+
# via mosparo-api-client (pyproject.toml)
15+
urllib3==1.26.15
16+
# via requests

setup.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)