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 2.8.1
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-2.8.1.tar.gz | 25.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senzing-2.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.8 kB
Release files / senzing-2.8.1.tar.gz
| Download URL | senzing-2.8.1.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb8b1be931afbe1bddd98c1d9e91308162b9d76bd2952683b14cee64d3a1a138
|
|
BLAKE2b-256 checksum How to use checksums |
f987aaa0c2c10635745b301706d95b17638669e07c98e5268bb46288afe2a1b1
|
| 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-2.8.1-py3-none-any.whl
| Download URL | senzing-2.8.1-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fff1457372300f6bc1dc580ec6376cb336859f135ebeb591a0c90e6a16b52726
|
|
BLAKE2b-256 checksum How to use checksums |
64956777c168e9c0a284535216ed42b3d37b22dbdc18824a4fea3fabf86bfb39
|
| 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
|