Skip to main content

SDK for the Ntropy API

Project description

Ntropy SDK

This repository hosts the SDK for the Ntropy API. To use the Ntropy API you require an API key which can be requested at ntropy.com.

The Ntropy API provides transaction enrichment and categorization, account ledger, metrics and custom model training. The full documentation is available at the developer portal.

Installation

$ python3 -m pip install --upgrade 'ntropy-sdk'

Quick Start

Enriching your first transaction requires an SDK object and an input Transaction object. The API key can be set in the environment variable NTROPY_API_KEY or in the SDK constructor:

from ntropy_sdk import SDK, Transaction

sdk = SDK("YOUR-API-KEY")
tx = Transaction(
    description = "AMAZON WEB SERVICES",
    entry_type = "outgoing",
    amount = 12042.37,
    iso_currency_code = "USD",
    date = "2021-11-01",
    transaction_id = "4yp49x3tbj9mD8DB4fM8DDY6Yxbx8YP14g565Xketw3tFmn",
    country = "US",
    account_holder_id = "id-1",
    account_holder_type = "business"
)

enriched_tx = sdk.add_transactions([tx])[0]
print(enriched_tx.merchant)

The returned EnrichedTransaction contains the added information by Ntropy API. You can consult the Enrichment section of the documentation for more information on the parameters for both Transaction and EnrichedTransaction.

Documentation

You can consult in-depth documentation and examples at the developer portal and at the SDK reference.

License:

Free software: MIT license

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntropy_sdk-4.23.1.tar.gz (203.7 kB view hashes)

Uploaded Source

Built Distribution

ntropy_sdk-4.23.1-py2.py3-none-any.whl (26.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page