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.10.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.10.3.tar.gz | 20.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senzing-1.10.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.5 kB
Release files / senzing-1.10.3.tar.gz
| Download URL | senzing-1.10.3.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4af1fd1346ce9ddcf1e2f5c77803a2a809b5740eab42856962d50ec4aa927f77
|
|
BLAKE2b-256 checksum How to use checksums |
d75aa34d9c5bc21953fac4e7e0043e906bef91b0510069134d1c179e169de081
|
| 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.10.3-py3-none-any.whl
| Download URL | senzing-1.10.3-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48af3e28e8d055aed75f843de4889f38f9cfd1fb83b67cff74418abf1a2790c4
|
|
BLAKE2b-256 checksum How to use checksums |
8f2a8698f0a721d4a103f8ab60b3c8e61236c2720233a9a2fabc7001b3a5b4b3
|
| 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
|