Skip to content

Commit 4801a4c

Browse files
author
Artsiom Khadzkou
committed
Added setup.py
1 parent afad6dd commit 4801a4c

File tree

7 files changed

+46
-10
lines changed

7 files changed

+46
-10
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ Before using our SDK make sure you have installed CompreFace and Python on your
4040
| 0.1.0 |||
4141

4242

43+
## Installation
44+
45+
It can be installed through pip:
46+
47+
```python
48+
$ pip install compreface-sdk
49+
```
50+
4351
## Usage
4452

4553
### Initialization
@@ -169,6 +177,9 @@ face_collection.verify(image_path=image_path, image_id=image_id, options={
169177
Here is example to detect faces from a given image.
170178

171179
```python
180+
from compreface import CompreFace
181+
from compreface.service import DetectionService
182+
172183
DOMAIN: str = 'http://localhost'
173184
PORT: str = '8000'
174185
DETECTION_API_KEY: str = 'a482a613-3118-4554-a295-153bd6e8ac65'
@@ -193,6 +204,9 @@ detection.detect(image_path=image_path, options={
193204
Here is example to verify face from a given images.
194205

195206
```python
207+
from compreface import CompreFace
208+
from compreface.service import VerificationService
209+
196210
DOMAIN: str = 'http://localhost'
197211
PORT: str = '8000'
198212
VERIFICATION_API_KEY: str = '3c6171a4-e115-41f0-afda-4032bda4bfe9'

compreface/client/add_example_of_subject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"""
1616

1717
import requests
18+
1819
from compreface.common.multipart_constructor import multipart_constructor
1920
from compreface.common.typed_dict import DetProbOptionsDict, check_fields_by_name
2021
from compreface.config.api_list import RECOGNIZE_CRUD_API
21-
from requests_toolbelt.multipart.encoder import MultipartEncoder
2222
from ..common import ClientRequest
2323

2424

compreface/client/delete_example_by_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
permissions and limitations under the License.
1515
"""
1616

17-
from compreface.config.api_list import RECOGNIZE_CRUD_API
1817
import requests
1918

19+
from compreface.config.api_list import RECOGNIZE_CRUD_API
2020
from ..common import ClientRequest
2121

2222

compreface/client/verification_face_from_image.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
or implied. See the License for the specific language governing
1414
permissions and limitations under the License.
1515
"""
16+
import requests
1617

1718
from compreface.common.multipart_constructor import multipart_constructor
18-
import os
19-
import requests
2019
from compreface.common.typed_dict import ExpandedOptionsDict, check_fields_by_name
2120
from compreface.config.api_list import RECOGNIZE_CRUD_API
22-
from requests_toolbelt.multipart.encoder import MultipartEncoder
2321
from ..common import ClientRequest
2422

2523

compreface/collections/face_collections.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@
1414
permissions and limitations under the License.
1515
"""
1616

17-
from compreface.use_cases.verifiy_face_from_images import VerifyFaceFromImage
18-
from compreface.common.typed_dict import AllOptionsDict, ExpandedOptionsDict, DetProbOptionsDict
19-
from requests.api import request
17+
from compreface.common.typed_dict import ExpandedOptionsDict, DetProbOptionsDict
2018
from ..use_cases import (
2119
AddExampleOfSubject,
2220
ListOfAllSavedSubjects,
2321
DeleteAllExamplesOfSubjectByName,
2422
DeleteExampleById,
25-
DetectFaceFromImage,
2623
VerificationFaceFromImage
2724
)
2825

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,31 @@
1313
or implied. See the License for the specific language governing
1414
permissions and limitations under the License.
1515
"""
16+
17+
18+
from setuptools import find_packages, setup
19+
20+
21+
setup(
22+
name='compreface-sdk',
23+
packages=find_packages(where='compreface', include=['examples']),
24+
version='0.1.0',
25+
license='apache-2.0',
26+
description='CompreFace Python SDK makes face recognition into your application even easier.',
27+
author='Exadel-Inc', # Not sure about that.
28+
author_email='your.email@domain.com', # Need to complete.
29+
url='https://github.com/exadel-inc/compreface-python-sdk',
30+
# Not sure about that.
31+
download_url='https://github.com/exadel-inc/compreface-python-sdk/v_01.tar.gz',
32+
keywords=['CompreFace'],
33+
install_requires=[
34+
'requests-toolbelt==0.9.1'
35+
],
36+
classifiers=[
37+
'Development Status :: 5 - Production/Stable',
38+
'Intended Audience :: Developers',
39+
'Topic :: Software Development :: Build Tools',
40+
'License :: OSI Approved :: Apache license 2.0',
41+
'Programming Language :: Python :: 3.7+',
42+
],
43+
)

0 commit comments

Comments
 (0)