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
🤔 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
⚠️ 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.14.7
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.14.7.tar.gz | 26.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senzing-1.14.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.9 kB
Release files / senzing-1.14.7.tar.gz
| Download URL | senzing-1.14.7.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d207ffe0052e266abb833f323947bf82673583beaae591a1746c50973cf85a90
|
|
BLAKE2b-256 checksum How to use checksums |
ff11570a0973dbe05d49783379baa53e8d32cb52a1b3a1cbb7f4e5d4146549a1
|
| 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.14.7-py3-none-any.whl
| Download URL | senzing-1.14.7-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39f77817e84b83446f3d47140cc7202ebb5f61b8248b7b5b00e5f9cb06cc18f6
|
|
BLAKE2b-256 checksum How to use checksums |
a33dded09d6e4a06fabc6e62d4a132b7a38db77f9c1258e4c1d112b0cf496aac
|
| 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
|