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
distdirectory.
Local test
Install from file
-
Install using
pip. Example:make file-install
Test local package
-
Run testcases found in
testsdirectory. 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
testsdirectory. 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 senzingShould return nothing.
-
Verify deletion in system repository. Example:
ls /usr/local/lib/python${SENZING_PYTHON_VERSION}/dist-packages | grep senzingShould return nothing.
References
Metadata
Release files for senzing 1.13.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| senzing-1.13.3.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senzing-1.13.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.5 kB
Release files / senzing-1.13.3.tar.gz
| Download URL | senzing-1.13.3.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cff5ace620d6c41ace1de939cb239221c1d915cb7533ceec59d9d468df7c5ce
|
|
BLAKE2b-256 checksum How to use checksums |
7ff40b456fc9d5916392ca6f64b2ec731b0e6e40037c1d7138cf883d44780c9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / senzing-1.13.3-py3-none-any.whl
| Download URL | senzing-1.13.3-py3-none-any.whl |
|---|---|
| Size | 34.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fc5d6c77e879110953bf511e40f9374433bdb7cb459c94d17cd20b203969973
|
|
BLAKE2b-256 checksum How to use checksums |
6223144fdfed23872f4f97625555c7a7b70b47afeb74388364a7db5ac19e1977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|