Skip to main content

Simple Python client for the pkg.go.dev v1beta API.

This project has been quarantined.

PyPI Admins need to review this project before it can be restored. While in quarantine, the project is not installable by clients, and cannot be being modified by its maintainers.

Read more in the project in quarantine help article.

Project description

govpkg

A simple Python client for the official pkg.go.dev v1beta API.

Installation

pip install govpkg

Usage

Search for a package

from govpkg import get

url = get("cobra")
print(url)
# https://pkg.go.dev/github.com/spf13/cobra

Get package metadata

from govpkg import package

pkg = package("github.com/spf13/cobra")
print(pkg)

You can also pass a pkg.go.dev URL:

pkg = package("https://pkg.go.dev/github.com/spf13/cobra")

Get module metadata

from govpkg import module

mod = module("github.com/spf13/cobra")
print(mod)

Or using a pkg.go.dev URL:

mod = module("https://pkg.go.dev/github.com/spf13/cobra")

API

get(query: str) -> str

Searches for a Go package and returns the pkg.go.dev URL of the best match.

package(path: str) -> dict

Returns metadata for a Go package.

module(path: str) -> dict

Returns metadata for the Go module containing the package.

Requirements

  • Python 3.9+
  • requests

License

MIT

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

govpkg-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

govpkg-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file govpkg-0.1.0.tar.gz.

File metadata

  • Download URL: govpkg-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for govpkg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c85ed16ca10393a3c5963edde9cdc97eeda8c5875447248883e054e86a8e2b55
MD5 5818c3e5aa0cab84da2fe813db7ced97
BLAKE2b-256 cc3fdbc75dee1a58b747219f85b3258f201d1d79ce013943aa896f06dc5ca384

See more details on using hashes here.

File details

Details for the file govpkg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: govpkg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for govpkg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88ad5acd31cdcee0275d5a0ebe552d52eac50227d856e58a853431e66bb5d271
MD5 ffc7845876e9f39f5be5bc24945177f9
BLAKE2b-256 6040639a5c99697ef987760f4289a15712cbb51026ff7a77c782ff6e201e7b59

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