Skip to main content

Python SDK for Senzing API

Project description

g2-sdk-python

Synopsis

Senzing Software Development Kit (SDK) for Python. Files are located in src/senzing.

Overview

This repository 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

  1. Develop
    1. Prerequisites for development
    2. FIXME:

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.

  1. The following software programs need to be installed:

    1. git
    2. make
    3. pip
  2. 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.

  1. 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}"
    
  2. Using the environment variables values just set, follow steps in clone-repository to install the Git repository.

Build python packages

  1. 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

  1. Install using pip. Example:

    make file-install
    

Test local package

  1. Run testcases found in tests directory. Example:

    make test
    

Uninstall local package

  1. 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.

  1. 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

  1. Install using pip. Example:

    pip3 install \
      --index-url https://test.pypi.org/simple/ \
      --no-deps \
      senzing
    

Test

  1. Run testcases found in tests directory. Example:

    make test
    

Uninstall

  1. Remove Senzing SDK for Python. Example:

    pip3 uninstall senzing
    

Verify Uninstall

  1. Identify python version. Example:

    export SENZING_PYTHON_VERSION=3.8
    
  2. Verify deletion in user python repository. Example:

    ls ~/.local/lib/python${SENZING_PYTHON_VERSION}/site-packages | grep senzing
    

    Should return nothing.

  3. Verify deletion in system repository. Example:

    ls /usr/local/lib/python${SENZING_PYTHON_VERSION}/dist-packages | grep senzing
    

    Should return nothing.

References

  1. Packaging Python Projects

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

senzing-1.2.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

senzing-1.2.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file senzing-1.2.0.tar.gz.

File metadata

  • Download URL: senzing-1.2.0.tar.gz
  • Upload date:
  • Size: 14.4 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

Hashes for senzing-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b343039bf3f996fabfa7d621ecb671289bbb7d2e36b5ada63e4522f24e74e92b
MD5 7b0601de83e98d19f49fe2185bd5ce3b
BLAKE2b-256 1a0679d8a64b621ef5f46d9082403141d5b85a429c7b7740e6a2906c341d9ee9

See more details on using hashes here.

File details

Details for the file senzing-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: senzing-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 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

Hashes for senzing-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6092d85f29a5a55da003e6da1f8f102243c8c65ad4e8011428dc97cca35c160
MD5 8dc6f60f09a08bb0c9f64c4175febcf3
BLAKE2b-256 72ead08e54221927f5f0be9bfb16d962a4b5dff140016323c3a9dce00c3ff0cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page