Skip to main content
In pyx, you can create custom “views” on public and private package indexes. A view can be thought of as a filtered combination of one or more indexes, exposed as a single index URL. For example, while the public/pypi index includes all packages from PyPI, in pyx, you can create your own index URLs that represent filtered subsets of PyPI, such as:
  • A view of all PyPI packages uploaded prior to a given date, i.e., a snapshot of PyPI at a given point in time (package.upload_time <= "2025-01-01")
  • A view of all PyPI packages that are at least a week old, to guard against malicious packages (package.age_days >= 7)
  • A view of all PyPI packages with at least 1,000 monthly downloads (package.pypi_downloads_30_days >= 1000)
  • A view of all PyPI packages with no critical vulnerabilities (package.cve_max_score < 9.0)
View filters are expressed in a query language based on a subset of Python. For example, to filter PyPI packages to only include those uploaded prior to a given date, you can use the following filter:
package.upload_time <= "2025-01-01"
The filter language exposes the following fields:
  • package.name: Package name (e.g., fastapi)
  • package.upload_time: Upload time (e.g., 2025-01-01)
  • package.age_days: Age in days (e.g., 7)
  • release.version: Release version (e.g., 0.100.0)
  • file.name: File name (e.g., fastapi-0.100.0-py3-none-any.whl)
  • package.pypi_downloads_30_days: 30-day downloads (e.g., 1000)
  • package.pypi_downloads_7_days: 7-day downloads (e.g., 100)
  • package.cve_max_score: Max CVE score (e.g., 9.0)
  • release.cve_max_score: Release CVE score (e.g., 9.0)
Conditions can be combined using logical operators, as in Python:
package.upload_time <= "2025-01-01" and package.pypi_downloads_30_days >= 1000
For example, to filter out a specific package (like setuptools) from a view, you can use the following filter:
package.name != "setuptools"
Similarly, to filter out a specific version of a package (like setuptools==69.0.0), you can use the following filter:
not (package.name == "setuptools" and release.version == "69.0.0")
You can also create views that combine multiple indexes. For example, a single view can pull in packages from your own private index if they exist, and falls back to PyPI if they don’t. Views are exposed using the same index URL scheme. For example, if your team is acme, and you create a dev view, you can install packages from the view with:
uv pip install fastapi --index https://api.pyx.dev/simple/acme/dev
To create a view, navigate to the Views tab in the pyx dashboard.
I