Skip to main content

PyPI

The Python Package Index (PyPI) is the official public repository for Python packages. Its JSON API returns package and release metadata—including version history, distribution files, hash digests, and known vulnerabilities—for any published project. The API is public and requires no authentication.

PyPI icon

Power end-to-end data operations for your PyPI API with Nexla. Our bi-directional PyPI connector is purpose-built for PyPI, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to PyPI or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your PyPI workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

The PyPI JSON API is public and read-only, so no account, API key, or token is required to fetch package metadata. Requests are issued against https://pypi.org and return JSON when the Accept: application/json header is present.

Before creating a source, identify the package data you want to ingest:

  • To fetch metadata for a package, note the exact project name as it appears on PyPI (for example, pip or requests). Project names are case-insensitive and normalize hyphens and underscores.

  • To fetch metadata for a specific version, note both the project name and the release version string (for example, 24.0).

For complete details about response fields, deprecated keys, and endpoint behavior, see the PyPI JSON API documentation.

Authenticate

Because the PyPI JSON API is public, no credential fields are required. You still create a Nexla credential to represent the connection so it can be reused across data flows.

Create a credential in Nexla

  1. After selecting the data source type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source creation.

    The PyPI JSON API does not require authentication. This credential simply identifies the connection to PyPI and can be reused across multiple PyPI data flows.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the PyPI connector tile, then select the credential that will be used to connect to PyPI, and click Next; or, create a new PyPI credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common PyPI endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] List Project

This endpoint template retrieves metadata for a single PyPI project. Use this template when you need a package's latest-version details, full release history, distribution file information, and known vulnerabilities.

  • Enter the Project Name of the PyPI project to fetch metadata for. This is the exact package name as published on PyPI (for example, pip).

This endpoint calls GET https://pypi.org/pypi/{project}/json and returns the info, urls, releases, and vulnerabilities sections for the project. Several legacy keys such as downloads and has_sig are deprecated and return placeholder values.

For detailed information about the response structure and available fields, see the PyPI JSON API documentation.

[Rest API] List Release

This endpoint template retrieves metadata for a specific release of a PyPI project. Use this template when you need details for one version rather than a package's entire release history.

  • Enter the Project Name of the PyPI project to fetch a release for (for example, requests).
  • Enter the Release Version to fetch metadata for. This is the exact version string as published on PyPI (for example, 2.31.0).

This endpoint calls GET https://pypi.org/pypi/{project}/{version}/json and returns the same structure as the project endpoint, scoped to the specified version. The response does not include the releases key of all historical versions.

For detailed information about the response structure and available fields, see the PyPI JSON API documentation.

[Rest API] List Stats

This endpoint template retrieves aggregate statistics about PyPI, including the total size of the package repository and a breakdown of the largest packages by storage size. Use this template when you need repository-level metrics rather than metadata for a specific package.

  • This endpoint requires no additional parameters. It returns statistics for the entire index when the request is made.

This endpoint calls GET https://pypi.org/stats and returns the overall repository size along with the top packages by size. The statistics endpoint requires the Accept: application/json header, which Nexla sets automatically.

For detailed information about the available statistics, see the PyPI JSON API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

PyPI data sources can also be manually configured to ingest data from any valid PyPI JSON API endpoint, including custom request parameters or endpoints not covered by the pre-built templates. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new PyPI data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.