Skip to main content

Python SDK for Sonatype Nexus Repository Manager

Project description

Sonatype: Nexus Repository Manager Python SDK

Overview

The Sonatype Nexus Python SDK is a powerful tool designed to facilitate the interaction of Python developers with Sonatype Nexus IQ Server and Nexus Repository Manager APIs. In addition, this SDK aims to simplify and streamline integrating the Nexus IQ Server and Nexus Repository Manager into your CI/CD pipelines.

GitHub Repository: https://github.com/beholdenkey/nxrm-sdk

Prerequisites

Ensure you have the following prerequisites before you proceed with the installation:

  • Python version 3.9 or later
  • pip (Python package installer)

Installation

You can install the Sonatype Nexus Python SDK using pip. Run the following command in your terminal:

pip install sonatype-nxrm-sdk

After successful installation, import the package in your Python script:

import nxrm_sdk

Quick Start Guide

Below is a simple example of how to delete a single asset using the SDK.

First, ensure that the package is correctly installed and then proceed as follows:

import nxrm_sdk
from nxrm_sdk.apis.tags import assets_api
# Defining the host is optional and defaults to http://localhost/service/rest
# Check configuration.py for a complete list of supported configuration parameters.
configuration = nxrm_sdk.Configuration(
    host = "http://localhost/service/rest"
)

# Enter a context with an instance of the API client
with nxrm_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = assets_api.AssetsApi(api_client)
    asset_id = "id_example" # str | Id of the asset to delete

    try:
        # Delete a single asset
        api_instance.delete_asset(asset_id)
    except nxrm_sdk.ApiException as e:
        print(f"Exception when calling AssetsApi->delete_asset: {e}")

Please replace "id_example" with the ID of the asset you want to delete.

Detailed Documentation

For more detailed documentation on the API and its usage, please visit the Sonatype Nexus Python SDK GitHub Repository.

Contribute

We welcome and appreciate any contributions. Please refer to the Contribution Guidelines for details on how you can contribute to this project.

Acknowledgements

We would like to extend our gratitude to the OpenAPI Generator project and the OpenAPI Initiative. This SDK was initially generated using the OpenAPI Generator and would not have been possible without the OpenAPI Initiative.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sonatype_nxrm_sdk-0.1.5.tar.gz (142.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonatype_nxrm_sdk-0.1.5-py3-none-any.whl (382.9 kB view details)

Uploaded Python 3

File details

Details for the file sonatype_nxrm_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: sonatype_nxrm_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 142.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for sonatype_nxrm_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 909057c8634885115410c5c8d78a27d372fbd24f74ffc9a2864755bc2d4a275c
MD5 50fc57399792050f3d0a726a9cbf60b0
BLAKE2b-256 96e7064b2d6f664b7abf88e28683a2670b148c95f820e0cf4178cdebac1598a1

See more details on using hashes here.

File details

Details for the file sonatype_nxrm_sdk-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sonatype_nxrm_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a882c11ff72c9aed23af51bcb342689b9a308f79d959b46c057e628a8de17b1f
MD5 d710b798db41d3cc351393a45784aba9
BLAKE2b-256 68e739177a515b0b170050a26303e9003dcda9e264489bf27b54b953fef24d6d

See more details on using hashes here.

Supported by

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