🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

govapkg

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Malware was recently detected in this package.

Affected versions:

0.1.0

govapkg

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

pipPyPI
Version
0.1.0
Weekly downloads
0
Maintainers
0
Weekly downloads
 

govapkg

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

Installation

pip install govapkg

Usage

Search for a package

from govapkg import get

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

Get package metadata

from govapkg 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 govapkg 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

Keywords

go

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts