New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

senzing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

senzing

Python SDK for Senzing API

  • 3.0.1
  • PyPI
  • Socket score

Maintainers
1

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

  1. Install
  2. Develop
    1. Prerequisites for development
    2. Clone repository
    3. Install dependencies
    4. Build python packages
    5. Local test
    6. Publish
    7. Test
    8. Uninstall
    9. Verify Uninstal
  3. References

Install

  1. Use the pip install command to install the Senzing SDK for Python. Example:

    pip install senzing
    
  2. 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.

  1. The following software programs need to be installed:

    1. git
    2. make
    3. pip
  2. :pencil2: Make a ~/.pypirc file. Example:

    [pypi]
      username = __token__
      password = pypi-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    [testpypi]
      username = __token__
      password = pypi-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
    

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.

Install dependencies

  1. Install python tools via Makefile. Example:

    cd ${GIT_REPOSITORY_DIR}
    make install-dependencies
    

Build python packages

  1. Build pip package using python3 -m build via Makefile. Example:

    cd ${GIT_REPOSITORY_DIR}
    make package
    

    Output will be in the dist directory.

Local test

Install from file
  1. Install using pip via Makefile. Example:

    cd ${GIT_REPOSITORY_DIR}
    make install-file
    
Test local package
  1. Run testcases found in tests directory. Example:

    cd ${GIT_REPOSITORY_DIR}
    make test
    
Uninstall local package
  1. Remove senzing. Example:

    cd ${GIT_REPOSITORY_DIR}
    make uninstall
    

Publish

:warning: On PyPi and test.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 test.pypi.org
  1. Publish to https://test.pypi.org. This is a test PyPi server. Example:

    cd ${GIT_REPOSITORY_DIR}
    make publish-test
    
Publish to pypi.org
  1. Publish to https://pypi.org. :warning: This requires that the workstation has gpg enabled with the signing key for "Senzing, Inc." Example:

    cd ${GIT_REPOSITORY_DIR}
    make publish-signed
    

Test

Install from test.pypi.org
  1. Install using pip via Makefile. Example:

    cd ${GIT_REPOSITORY_DIR}
    make install-test
    
Install from pypi.org
  1. Install using pip via Makefile. Example:

    cd ${GIT_REPOSITORY_DIR}
    make install
    
Unit tests
  1. Run testcases found in tests directory. Example:

    cd ${GIT_REPOSITORY_DIR}
    make test
    

Uninstall

  1. Remove Senzing SDK for Python. Example:

    cd ${GIT_REPOSITORY_DIR}
    make uninstall
    

Verify Uninstall

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc