Skip to main content

GitHub top language PyPI - Python Version PyPI - Version PyPI - Wheel OpenSSF Scorecard OpenSSF Best Practices GitHub commit activity (branch) GitHub Release Date - Published_At GitHub watchers GitHub User's stars CodeQL

Logo

Open Source Insights Consume API

This library will consume data from project Google Open Source Insights.

More information in deps.dev.

pip install open-source-insights-api

Example use CLI:

user@shell$ sbom_insights --help
usage: sbom_insights [-h] [-f [FILE]]

SBOM Insights

options:
  -h, --help            show this help message and exit
  -f [FILE], --file [FILE]
                        Define sbom.json to consume e return insights. (Default is sbom.json)
user@shell$ sbom_insights --file /opt/project/sbom.json
                                     SBOM Insights
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Package         Repository  Version    Latest Version  Dep Direct  Dep Indirect ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ anyio           pypi        4.0.0      4.0.0           3           0            │
│ certifi         pypi        2023.7.22  2023.7.22       0           0            │
│ exceptiongroup  pypi        1.1.3      1.1.3           0           0            │
│ h11             pypi        0.14.0     0.14.0          0           0            │
│ httpcore        pypi        0.18.0     0.18.0          4           2            │
│ httpx           pypi        0.25.0     0.25.0          4           3            │
│ idna            pypi        3.4        3.4.0           0           0            │
│ markdown-it-py  pypi        3.0.0      3.0.0           1           0            │
│ mdurl           pypi        0.1.2      0.1.2           0           0            │
│ pygments        pypi        2.15.1     2.16.1          0           0            │
│ rich            pypi        13.4.2     13.5.3          2           1            │
│ sniffio         pypi        1.3.0      1.3.0           0           0            │
└────────────────┴────────────┴───────────┴────────────────┴────────────┴──────────────┘

Example use in code:

from open_source_insights_api import os_insights

osi = os_insights.query()

#Will return all vulnerabilities in GHSA
vulns = osi.GetAdvisory('ghsa-xxxx-xxxx-xxxx') # ID vulnerability GHSA

#Will return all dependencies the package
deps = osi.GetDependencies('pypi', 'requests', '2.30.0') # Repository, Package, Version

#Will return simple info about the package
pkg = osi.GetPackage('pypi', 'requests') # Repository, Package

#Will return OpenSSF Scorecard and other info about repository in GitHub GitLab or BitBucket
project = osi.GetProject('github.com/owner/pkg')

#Will return all dependencies required to the package run
req = osi.GetRequirements('pypi', 'requests', '2.30.0')

#Will return information about especific version
version = osi.GetRequirements('pypi', 'requests', '2.30.0')

#Will search package in database of deps.dev
#Way one
result = osi.Search(system_repo="pypi", pkg_name="requests", pkg_version="2.30.0")
#Way two
result = osi.Search(hash_type="sha256", hash_value="57678e48b28e1be96ac260ad265ba84ace59cc5e098f65e28263363fa5f724c4")

Release files for open-source-insights-api 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-source-insights-api 0.1.17
File Size Uploaded
open_source_insights_api-0.1.17.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for open-source-insights-api 0.1.17
File Interpreter ABI Platform
open_source_insights_api-0.1.17-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / open_source_insights_api-0.1.17.tar.gz

Download URL open_source_insights_api-0.1.17.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9e1087b735be7f908ecf9e77339c45c0c00812ce2bc139e053d1427a3e2617f6
BLAKE2b-256 checksum
How to use checksums
239ab9d5deb5de7e572c4ecd4390daa9bf9ad61170626399e78b05979a3a4667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.12 Linux/5.10.102.1-microsoft-standard-WSL2

Release files / open_source_insights_api-0.1.17-py3-none-any.whl

Download URL open_source_insights_api-0.1.17-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8cedfa8a1182a0c6aa115998ff8d10145bf907485dcda54cfd1560c07f0c5fe
BLAKE2b-256 checksum
How to use checksums
1ec7ae7c8a048ae3f6027265654c8db1c4f7c67ecbe98cc6cd462d12c132d2d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.12 Linux/5.10.102.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.1.17 This release

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page