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.2.0.tar.gz (3.7 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.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for govpkg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 604e5bcbda99afa5dd4e8c56a8f75700045adae13fa9fb001eb99014033a4fe2
MD5 66c4d131ebf2d163e5583e1b8ca60e11
BLAKE2b-256 f348c47049ec69fe172defe50ceb8640f94836f290f12eb27e8dd06b317b5eb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: govpkg-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e4c428aee2f4cc1988db31a600485360a7c67e67ffac48eba5eef2661843cff
MD5 95f73587048018c033239baff43a06b1
BLAKE2b-256 17b1a8dc8ca26cb7c831531b8cfe6ad9e86703fba62c71594570115deffac992

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