Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sypht-team/sypht-golang-client
A Golang client for the Sypht API
https://github.com/sypht-team/sypht-golang-client
api-client data-extraction document-capture extract extract-data-from-pdf extract-fields go golang golang-library golang-package invoice invoice-parser pdf-parser receipt-capture receipt-reader receipt-scanner receipt-scanning sypht sypht-api sypht-golang-client
Last synced: about 1 month ago
JSON representation
A Golang client for the Sypht API
- Host: GitHub
- URL: https://github.com/sypht-team/sypht-golang-client
- Owner: sypht-team
- License: apache-2.0
- Created: 2019-09-11T03:20:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T00:40:11.000Z (over 4 years ago)
- Last Synced: 2024-06-21T06:40:07.905Z (6 months ago)
- Topics: api-client, data-extraction, document-capture, extract, extract-data-from-pdf, extract-fields, go, golang, golang-library, golang-package, invoice, invoice-parser, pdf-parser, receipt-capture, receipt-reader, receipt-scanner, receipt-scanning, sypht, sypht-api, sypht-golang-client
- Language: Go
- Homepage: https://sypht.com
- Size: 73.2 KB
- Stars: 33
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Sypht Golang Client
This repository is a Golang reference client implementation for working with the Sypht API at https://api.sypht.com.## About Sypht
[Sypht](https://sypht.com) is a SaaS [API]((https://docs.sypht.com/)) which extracts key fields from documents. For
example, you can upload an image or pdf of a bill or invoice and extract the amount due, due date, invoice number
and biller information.## Getting started
To get started you'll need API credentials, i.e. a `client_id` and `client_secret`, which can be obtained by registering
for an [account](https://www.sypht.com/signup/developer)## Prerequisites
* Go - supports **Go 1.13 or greater**.## Installation
```sh
$ go get github.com/sypht-team/sypht-golang-client
```## Usage
Populate system environment variable with the credentials generated above:```Bash
SYPHT_API_KEY="$client_id:$client_secret"
```Updated 30/06/2020
We are in the process of deprecating our legacy authentication endpoint.
To use new authentication endpoint
```Bash
SYPHT_AUTH_ENDPOINT="https://auth.sypht.com/oauth2/token"
```
[For more info](https://docs.sypht.com/#section/Authentication)then invoke the client with a file of your choice:
```go
client, _ := sypht.NewSyphtClient(os.Getenv("SYPHT_API_KEY"), nil)uploaded, _ := client.Upload(fileName, []string{
sypht.Invoice,
sypht.Document,
}, "")result, _ := client.Results(uploaded.FileID)
fmt.Println(result)
```## License
The software in this repository is available as open source under the terms of the [Apache License](https://github.com/sypht-team/sypht-golang-client/blob/master/LICENSE).## Code of Conduct
Everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/sypht-team/sypht-golang-client/blob/master/CODE_OF_CONDUCT.md).