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
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. Example:
pip install senzing
-
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:
-
Install python tools. Example:
python3 -m pip install --upgrade build python3 -m pip install --upgrade twine
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.
Build python packages
-
Build pip package using
python3 -m build
. Example:cd ${GIT_REPOSITORY_DIR} make package
Output will be in the
dist
directory.
Local test
Install from file
-
Install using
pip
. Example:make file-install
Test local package
-
Run testcases found in
tests
directory. Example:make test
Uninstall local package
-
Remove senzing. Example:
pip3 uninstall senzing
Publish
:warning: On 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 https://test.pypi.org. This is a test PyPi server. Example:
cd ${GIT_REPOSITORY_DIR} make test-publish
Install from test.pypi.org
-
Install using
pip
. Example:pip3 install \ --index-url https://test.pypi.org/simple/ \ --no-deps \ senzing
Test
-
Run testcases found in
tests
directory. Example:make test
Uninstall
-
Remove Senzing SDK for Python. Example:
pip3 uninstall senzing
Verify Uninstall
-
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-2.6.0.tar.gz
.
File metadata
- Download URL: senzing-2.6.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19cc0a50fdf58d0694a5e597f9c52d08165ba57c1bcfca5d1268f6483c3e3cd2 |
|
MD5 | 0fdc9d3380a7da34fd324423ee7a3b37 |
|
BLAKE2b-256 | 875d208c2fa2b352afda03563730d787146e8727041cd84f2b104ac8f403d38c |
File details
Details for the file senzing-2.6.0-py3-none-any.whl
.
File metadata
- Download URL: senzing-2.6.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 221c9f224f08f1461798d39bb7fb727b17e226c99b9b27ca5953fe41aba61d07 |
|
MD5 | 7d7467e7b84f9be850bd46ca024b2a62 |
|
BLAKE2b-256 | f13599f7cee969f08be983e942af1bb66367cb02b24e987b11d0f9b007a89cd6 |