Skip to content

Commit fef1efa

Browse files
author
Dmitry Birulia
committed
first commit
0 parents  commit fef1efa

15 files changed

+454
-0
lines changed

.idea/.gitignore

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/veryfi.iml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License
2+
3+
Copyright (c) 2019 Veryfi, Inc. <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
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, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!make
2+
3+
# Setting up for local development
4+
.PHONY: setup
5+
setup:
6+
pip install -r requirements.txt
7+
8+
# Clean the /dist directory for a new publish
9+
.PHONY: package-clean
10+
package-clean:
11+
@rm -rf dist/*
12+
13+
# Build a new package into the /dist directory
14+
.PHONY: package-build
15+
package-build:
16+
python setup.py sdist
17+
18+
# Publish the new /dist package to Pypi
19+
.PHONY: package-publish
20+
package-publish:
21+
twine upload dist/*

README.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# veryfi
2+
3+
[![PyPI - version](https://img.shields.io/pypi/v/veryfi.svg)](https://pypi.python.org/pypi/veryfi)
4+
[![PyPI](https://img.shields.io/pypi/pyversions/veryfi.svg)](https://pypi.python.org/pypi/veryfi)
5+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
6+
7+
**veryfi** is a Python module for communicating with the [Veryfi OCR API](https://veryfi.com/api/)
8+
9+
## Installation
10+
11+
Install from PyPi using [pip](http://www.pip-installer.org/en/latest/), a
12+
package manager for Python.
13+
14+
15+
Install the package from PyPI:
16+
```bash
17+
pip install veryfi
18+
```
19+
You may need to run the above commands with `sudo`.
20+
21+
## Getting Started
22+
23+
### Obtaining Client ID and user keys
24+
If you don't have an account with Veryfi, please go ahead and register here: [https://hub.veryfi.com/signup/api/](https://hub.veryfi.com/signup/api/)
25+
26+
### Python API Client Library
27+
The **veryfi** library can be used to communicate with Veryfi API,
28+
29+
Below is the sample script using **veryfi** to OCR and extract data from a document:
30+
31+
```python
32+
33+
from veryfi import Client
34+
35+
client_id = 'your_client_id'
36+
client_secret = 'your_client_secret'
37+
username = 'your_username'
38+
api_key = 'your_password'
39+
40+
categories = ['Grocery', 'Utilities', 'Travel']
41+
file_path = '/tmp/invoice.jpg'
42+
43+
# This submits document for processing (takes 3-5 seconds to get response)
44+
veryfi_client = Client(client_id, client_secret, username, api_key)
45+
response = veryfi_client.process_document(file_path, categories=categories)
46+
print (response.json())
47+
```
48+
49+
## Need help?
50+
If you run into any issue or need help installing or using the library, please contact [email protected].
51+
52+
If you found a bug in this library or would like new features added, then open an issue or pull requests against this repo!
53+

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
##### Dependencies
2+
requests==2.23.0

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import absolute_import
3+
from __future__ import unicode_literals
4+
5+
from setuptools import setup
6+
7+
setup(
8+
name="veryfi",
9+
version="0.0.1",
10+
description="A Python Package for Sending Veryfi APIs",
11+
author="Veryfi, Inc.",
12+
author_email="[email protected]",
13+
classifiers=[
14+
"License :: OSI Approved :: MIT License",
15+
"Programming Language :: Python :: 3.4",
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 :: Implementation :: CPython",
21+
],
22+
license="MIT",
23+
url="https://github.com/veryfi/veryfi-python",
24+
keywords=["veryfi", "veryfi.com", "ocr api"],
25+
install_requires=["requests"],
26+
)

0 commit comments

Comments
 (0)