Python SDK for Senzing API
Project description
g2-sdk-python
Synopsis
Senzing Software Development Kit (SDK) for Python. This SDK provide python access to the senzingapi
Warning: Using pip install senzing-ce
will install a version of the Senzing Python SDK
that is not covered by Senzing's Service Level Agreement (SLA).
To obtain a version of the Senzing Python SDK that is covered, see
Install Senzing API.
More information at github.com/Senzing/g2-sdk-python
Overview
The git repository at
github.com/Senzing/g2-sdk-python
contains the Senzing SDK for Python files in src/senzing
.
It also contains:
- Tooling to create Python "wheel" packages
- Test suites
- Instructions for publishing to PyPi.
Contents
Install
-
Use the pip install command to install the Senzing SDK for Python community edition. Example:
pip install senzing-ce
-
More information at github.com/Senzing/g2-sdk-python
Develop
The following instructions are used when modifying and building the Docker image.
Prerequisites for development
:thinking: The following tasks need to be complete before proceeding. These are "one-time tasks" which may already have been completed.
-
The following software programs need to be installed:
-
:pencil2: Make a
~/.pypirc
file. Example:[pypi] username = __token__ password = pypi-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [testpypi] username = __token__ password = pypi-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Clone repository
For more information on environment variables, see Environment Variables.
-
Set these environment variable values:
export GIT_ACCOUNT=senzing export GIT_REPOSITORY=g2-sdk-python export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
-
Using the environment variables values just set, follow steps in clone-repository to install the Git repository.
Install dependencies
-
Install python tools via
Makefile
. Example:cd ${GIT_REPOSITORY_DIR} make install-dependencies
Build python packages
-
Build pip package using
python3 -m build
viaMakefile
. Example:cd ${GIT_REPOSITORY_DIR} make package
Output will be in the
dist
directory.
Local test
Install from file
-
Install using
pip
viaMakefile
. Example:cd ${GIT_REPOSITORY_DIR} make install-file
Test local package
-
Run testcases found in
tests
directory. Example:cd ${GIT_REPOSITORY_DIR} make test
Uninstall local package
-
Remove senzing. Example:
cd ${GIT_REPOSITORY_DIR} make uninstall
Publish
:warning: On PyPi and test.pypi, pip package versions are immmutable. They cannot be deleted nor updated. Since only one instance of a version can be published, be careful on what is published.
Publish to test.pypi.org
-
Publish to https://test.pypi.org. This is a test PyPi server. Example:
cd ${GIT_REPOSITORY_DIR} make publish-test
Publish to pypi.org
-
Publish to https://pypi.org. :warning: This requires that the workstation has
gpg
enabled with the signing key for "Senzing, Inc." Example:cd ${GIT_REPOSITORY_DIR} make publish-signed
Test
Install from test.pypi.org
-
Install using
pip
viaMakefile
. Example:cd ${GIT_REPOSITORY_DIR} make install-test
Install from pypi.org
-
Install using
pip
viaMakefile
. Example:cd ${GIT_REPOSITORY_DIR} make install
Unit tests
-
Run testcases found in
tests
directory. Example:cd ${GIT_REPOSITORY_DIR} make test
Uninstall
-
Remove Senzing SDK for Python. Example:
cd ${GIT_REPOSITORY_DIR} make uninstall
Verify Uninstall
-
:pencil2: Identify python version. Example:
export SENZING_PYTHON_VERSION=3.8
-
Verify deletion in user python repository. Example:
ls ~/.local/lib/python${SENZING_PYTHON_VERSION}/site-packages | grep senzing
Should return nothing.
-
Verify deletion in system repository. Example:
ls /usr/local/lib/python${SENZING_PYTHON_VERSION}/dist-packages | grep senzing
Should return nothing.
References
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
Built Distribution
File details
Details for the file senzing-ce-3.3.0.tar.gz
.
File metadata
- Download URL: senzing-ce-3.3.0.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42a4d2972a196db729e3b202d0987d38c40f5053a47f1bf8a1976a450530d8ce |
|
MD5 | 0a1498a3e2cf2483fc3ca123951c98f2 |
|
BLAKE2b-256 | e13a14fc9d9897bec2961a6a24786e2e623f84bfbc24cc0b6d6344a09956454d |
File details
Details for the file senzing_ce-3.3.0-py3-none-any.whl
.
File metadata
- Download URL: senzing_ce-3.3.0-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a08509c75065ed822e2589aa6587384319a38c48ceb2dc3bca70978e685d2003 |
|
MD5 | 5441f9ffaebf02aa19dae92663510615 |
|
BLAKE2b-256 | 124ce091d08693dbb852f7e62901af5a441aca19fef22ac07957a90865261fb7 |