socket-sdk-python


Namesocket-sdk-python JSON
Version 1.0.14 PyPI version JSON
download
home_pageNone
SummarySocket Security Python SDK
upload_time2024-11-06 03:57:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2022 Socket Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords socketsecurity socket.dev sca oss security sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
socket-python-sdk
#################

Purpose
-------

The Socket.dev Python SDK provides a wrapper around the Socket.dev REST API to simplify making calls to the API from Python.

Socket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api

Initializing the module
-----------------------

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME", timeout=30)

**PARAMETERS:**

- **token (str)** - The Socket API Key for your Organization
- **Timeout (int)** - The number of seconds to wait before failing the connection

Supported Functions
-------------------


purl.post(license, components)
""""""""""""""""""""""""""""""
Retrieve the package information for a purl post

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    license = "true"
    components = [
        {
        "purl": "pkg:pypi/pyonepassword@5.0.0"
        },
        {
        "purl": "pkg:pypi/socketsecurity"
        }
    ]
    print(socket.purl.post(license, components))

**PARAMETERS:**

- **license (str)** - The license parameter if enabled will show alerts and license information. If disabled will only show the basic package metadata and scores. Default is true
- **components (array{dict})** - The components list of packages urls

export.cdx_bom(org_slug, id, query_params)
""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as a CycloneDX SBOM

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    from socketdev.export import ExportQueryParams

    socket = socketdev(token="REPLACE_ME")
    query_params = ExportQueryParams(
        author="john_doe",
        project_name="my-project"
    )
    print(socket.export.cdx_bom("org_slug", "sbom_id", query_params))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **id (str)** - The ID of either a full scan or an SBOM report
- **query_params (ExportQueryParams)** - Optional query parameters for filtering:
    - **author (str)** - Filter by author
    - **project_group (str)** - Filter by project group
    - **project_name (str)** - Filter by project name
    - **project_version (str)** - Filter by project version
    - **project_id (str)** - Filter by project ID

export.spdx_bom(org_slug, id, query_params)
"""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as an SPDX SBOM

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    from socketdev.export import ExportQueryParams

    socket = socketdev(token="REPLACE_ME")
    query_params = ExportQueryParams(
        project_name="my-project",
        project_version="1.0.0"
    )
    print(socket.export.spdx_bom("org_slug", "sbom_id", query_params))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **id (str)** - The ID of either a full scan or an SBOM report
- **query_params (ExportQueryParams)** - Optional query parameters for filtering:
    - **author (str)** - Filter by author
    - **project_group (str)** - Filter by project group
    - **project_name (str)** - Filter by project name
    - **project_version (str)** - Filter by project version
    - **project_id (str)** - Filter by project ID

fullscans.get(org_slug)
"""""""""""""""""""""""
Retrieve the Fullscans information for around Organization

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.fullscans.get("org_slug"))

**PARAMETERS:**

- **org_slug (str)** - The organization name

fullscans.post(files, params)
"""""""""""""""""""""""""""""
Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    files = [
        "/path/to/manifest/package.json"
    ]
    params = {
    "org_slug": "org_name",
    "repo": "TestRepo",
    "branch": "main",
    "commit_message": "Test Commit Message",
    "commit_hash": "",
    "pull_request": "",
    "committers": "commiter",
    "make_default_branch": False,
    "set_as_pending_head": False,
    "tmp": ""
    }

    print(socket.fullscans.post(files, params))

**PARAMETERS:**

- **files (list)** - List of file paths of manifest files
- **params (dict)** - List of parameters to create a fullscan

+------------------------+------------+-------------------------------------------------------------------------------+
| Parameter              | Required   | Description                                                                   |
+========================+============+===============================================================================+
| org_slug               | True       | The string name in a git approved name for organization.                      |
+------------------------+------------+-------------------------------------------------------------------------------+
| repo                   | True       | The string name in a git approved name for repositories.                      |
+------------------------+------------+-------------------------------------------------------------------------------+
| branch                 | False      | The string name in a git approved name for branches.                          |
+------------------------+------------+-------------------------------------------------------------------------------+
| committers             | False      | The string name of the person doing the commit or running the CLI.            |
|                        |            | Can be specified multiple times to have more than one committer.              |
+------------------------+------------+-------------------------------------------------------------------------------+
| pull_request           | False      | The integer for the PR or MR number.                                          |
+------------------------+------------+-------------------------------------------------------------------------------+
| commit_message         | False      | The string for a commit message if there is one.                              |
+------------------------+------------+-------------------------------------------------------------------------------+
| make_default_branch    | False      | If the flag is specified this will signal that this is the default branch.    |
+------------------------+------------+-------------------------------------------------------------------------------+
| commit_hash            | False      | Optional git commit hash                                                      |
+------------------------+------------+-------------------------------------------------------------------------------+
| set_as_pending_head    | False      |                                                                               |
+------------------------+------------+-------------------------------------------------------------------------------+
| tmp                    | False      |                                                                               |
+------------------------+------------+-------------------------------------------------------------------------------+

fullscans.delete(org_slug, full_scan_id)
""""""""""""""""""""""""""""""""""""""""
Delete an existing full scan.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.fullscans.delete(org_slug, full_scan_id))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan

fullscans.stream_diff(org_slug, before, after, preview)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
Stream a diff between two full scans. Returns a scan diff.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.fullscans.stream_diff("org_slug", "before_scan_id", "after_scan_id"))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **before (str)** - The base full scan ID
- **after (str)** - The comparison full scan ID
- **preview (bool)** - Create a diff-scan that is not persisted. Defaults to False

fullscans.stream(org_slug, full_scan_id)
""""""""""""""""""""""""""""""""""""""""
Stream all SBOM artifacts for a full scan.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.fullscans.stream(org_slug, full_scan_id))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan

fullscans.metadata(org_slug, full_scan_id)
""""""""""""""""""""""""""""""""""""""""""
Get metadata for a single full scan

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.fullscans.metadata(org_slug, full_scan_id))

**PARAMETERS:**

- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan

dependencies.get(limit, offset)
"""""""""""""""""""""""""""""""
Retrieve the dependencies for the organization associated with the API Key

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.dependencies.get(10, 0))

**PARAMETERS:**

- **limit (int)** - The maximum number of dependencies to return
- **offset (int)** - The index to start from for pulling the dependencies

dependencies.post(files, params)
""""""""""""""""""""""""""""""""
Retrieve the dependencies for the organization associated with the API Key

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    file_names = [
        "path/to/package.json"
    ]
    params = {
        "repository": "username/repo-name",
        "branch": "dependency-branch
    }
    print(socket.dependencies.post(file_names, params))

**PARAMETERS:**

- **files (list)** - The file paths of the manifest files to import into the Dependency API.
- **params (dict)** - A dictionary of the `repository` and `branch` options for the API

repos.get()
"""""""""""
Get a list of information about the tracked repositores

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.repos.get(sort="name", direction="asc", per_page=100, page=1))

**PARAMETERS:**

- **sort** - The key to sort on froom the repo properties. Defaults to `created_at`
- **direction** - Can be `desc` or `asc`. Defaults to `desc`
- **per_page** - Integer between 1 to 100. Defaults to `10`
- **page** - Integer page number defaults to `1`. If there are no more results it will be `0`

repos.post()
""""""""""""
Create a new Socket Repository

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(
        socket.repos.post(
            name="example",
            description="Info about Repo",
            homepage="http://homepage",
            visibility='public',
            archived=False,
            default_branch='not-main'
        )
    )

**PARAMETERS:**

- **name(required)** - The name of the Socket Repository
- **description(optional)** - String description of the repository
- **homepage(optional)** - URL of the homepage of the
- **visibility(optional)** - Can be `public` or `private` and defaults to `private`
- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`
- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`

repos.repo()
""""""""""""
Get a list of information about the tracked repositores

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.repos.repo(org_slug="example", repo_name="example-repo")

repos.update()
""""""""""""""
Update an existing Socket Repository

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(
        socket.repos.update(
            org_slug="example-org",
            repo_name="example",
            name="new-name-example",
            description="Info about Repo",
            homepage="http://homepage",
            visibility='public',
            archived=False,
            default_branch='not-main'
        )
    )

- **name(optional)** - The name of the Socket Repository
- **description(optional)** - String description of the repository
- **homepage(optional)** - URL of the homepage of the
- **visibility(optional)** - Can be `public` or `private` and defaults to `private`
- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`
- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`

repos.delete()
""""""""""""""
Delete a Socket Repository

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.repos.delete(org_slug="example", repo_name="example-repo")

**PARAMETERS:**

- **org_slug** - Name of the Socket Org
- **repo_name** - The name of the Socket Repository to delete

org.get()
"""""""""
Retrieve the Socket.dev org information

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.org.get())

quota.get()
"""""""""""
Retrieve the the current quota available for your API Key

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.quota.get())

settings.get()
""""""""""""""
Retrieve the Socket Organization Settings

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.settings.get())

report.supported()
""""""""""""""""""
Retrieve the supported types of manifest files for creating a report

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.report.supported())

Deprecated: report.list()
"""""""""""""""""""""""""
Retrieve the list of all reports for the organization

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.report.list(from_time=1726183485))

**PARAMETERS:**

- **from_time (int)** - The Unix Timestamp in Seconds to limit the reports pulled

Deprecated: report.delete(report_id)
""""""""""""""""""""""""""""""""""""
Delete the specified report

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.report.delete("report-id"))

**PARAMETERS:**

- **report_id (str)** - The report ID of the report to delete

Deprecated: report.view(report_id)
""""""""""""""""""""""""""""""""""
Retrieve the information for a Project Health Report

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.report.view("report_id"))

**PARAMETERS:**

- **report_id (str)** - The report ID of the report to view

Deprecated: report.create(files)
""""""""""""""""""""""""""""""""
Create a new project health report with the provided files

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    files = [
        "/path/to/manifest/package.json"
    ]
    print(socket.report.create(files))

**PARAMETERS:**

- **files (list)** - List of file paths of manifest files

Deprecated: repositories.get()
""""""""""""""""""""""""""""""
Get a list of information about the tracked repositores

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.repositories.get())

Deprecated: sbom.view(report_id)
""""""""""""""""""""""""""""""""
Retrieve the information for a SBOM Report

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.sbom.view("report_id"))

Deprecated: npm.issues(package, version)
""""""""""""""""""""""""""""""""""""""""
Retrieve the Issues associated with a package and version.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.npm.issues("hardhat-gas-report", "1.1.25"))

**PARAMETERS:**

- **package (str)** - The name of the NPM package.
- **version (str)** - The version of the NPM Package.

Deprecated: npm.score(package, version)
"""""""""""""""""""""""""""""""""""""""
Retrieve the Issues associated with a package and version.

**Usage:**

.. code-block:: python

    from socketdev import socketdev
    socket = socketdev(token="REPLACE_ME")
    print(socket.npm.score("hardhat-gas-report", "1.1.25"))

**PARAMETERS:**

- **package (str)** - The name of the NPM package.
- **version (str)** - The version of the NPM Package.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "socket-sdk-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Douglas Coburn <douglas@socket.dev>",
    "keywords": "socketsecurity, socket.dev, sca, oss, security, sdk",
    "author": null,
    "author_email": "Douglas Coburn <douglas@socket.dev>",
    "download_url": "https://files.pythonhosted.org/packages/ad/5f/5519de7a0210562b3bf145439d022d44bc864db49fe48b15827bb19e1d8e/socket_sdk_python-1.0.14.tar.gz",
    "platform": null,
    "description": "\nsocket-python-sdk\n#################\n\nPurpose\n-------\n\nThe Socket.dev Python SDK provides a wrapper around the Socket.dev REST API to simplify making calls to the API from Python.\n\nSocket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api\n\nInitializing the module\n-----------------------\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\", timeout=30)\n\n**PARAMETERS:**\n\n- **token (str)** - The Socket API Key for your Organization\n- **Timeout (int)** - The number of seconds to wait before failing the connection\n\nSupported Functions\n-------------------\n\n\npurl.post(license, components)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the package information for a purl post\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    license = \"true\"\n    components = [\n        {\n        \"purl\": \"pkg:pypi/pyonepassword@5.0.0\"\n        },\n        {\n        \"purl\": \"pkg:pypi/socketsecurity\"\n        }\n    ]\n    print(socket.purl.post(license, components))\n\n**PARAMETERS:**\n\n- **license (str)** - The license parameter if enabled will show alerts and license information. If disabled will only show the basic package metadata and scores. Default is true\n- **components (array{dict})** - The components list of packages urls\n\nexport.cdx_bom(org_slug, id, query_params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nExport a Socket SBOM as a CycloneDX SBOM\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    from socketdev.export import ExportQueryParams\n\n    socket = socketdev(token=\"REPLACE_ME\")\n    query_params = ExportQueryParams(\n        author=\"john_doe\",\n        project_name=\"my-project\"\n    )\n    print(socket.export.cdx_bom(\"org_slug\", \"sbom_id\", query_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **id (str)** - The ID of either a full scan or an SBOM report\n- **query_params (ExportQueryParams)** - Optional query parameters for filtering:\n    - **author (str)** - Filter by author\n    - **project_group (str)** - Filter by project group\n    - **project_name (str)** - Filter by project name\n    - **project_version (str)** - Filter by project version\n    - **project_id (str)** - Filter by project ID\n\nexport.spdx_bom(org_slug, id, query_params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nExport a Socket SBOM as an SPDX SBOM\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    from socketdev.export import ExportQueryParams\n\n    socket = socketdev(token=\"REPLACE_ME\")\n    query_params = ExportQueryParams(\n        project_name=\"my-project\",\n        project_version=\"1.0.0\"\n    )\n    print(socket.export.spdx_bom(\"org_slug\", \"sbom_id\", query_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **id (str)** - The ID of either a full scan or an SBOM report\n- **query_params (ExportQueryParams)** - Optional query parameters for filtering:\n    - **author (str)** - Filter by author\n    - **project_group (str)** - Filter by project group\n    - **project_name (str)** - Filter by project name\n    - **project_version (str)** - Filter by project version\n    - **project_id (str)** - Filter by project ID\n\nfullscans.get(org_slug)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Fullscans information for around Organization\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.fullscans.get(\"org_slug\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n\nfullscans.post(files, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    files = [\n        \"/path/to/manifest/package.json\"\n    ]\n    params = {\n    \"org_slug\": \"org_name\",\n    \"repo\": \"TestRepo\",\n    \"branch\": \"main\",\n    \"commit_message\": \"Test Commit Message\",\n    \"commit_hash\": \"\",\n    \"pull_request\": \"\",\n    \"committers\": \"commiter\",\n    \"make_default_branch\": False,\n    \"set_as_pending_head\": False,\n    \"tmp\": \"\"\n    }\n\n    print(socket.fullscans.post(files, params))\n\n**PARAMETERS:**\n\n- **files (list)** - List of file paths of manifest files\n- **params (dict)** - List of parameters to create a fullscan\n\n+------------------------+------------+-------------------------------------------------------------------------------+\n| Parameter              | Required   | Description                                                                   |\n+========================+============+===============================================================================+\n| org_slug               | True       | The string name in a git approved name for organization.                      |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| repo                   | True       | The string name in a git approved name for repositories.                      |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| branch                 | False      | The string name in a git approved name for branches.                          |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| committers             | False      | The string name of the person doing the commit or running the CLI.            |\n|                        |            | Can be specified multiple times to have more than one committer.              |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| pull_request           | False      | The integer for the PR or MR number.                                          |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| commit_message         | False      | The string for a commit message if there is one.                              |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| make_default_branch    | False      | If the flag is specified this will signal that this is the default branch.    |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| commit_hash            | False      | Optional git commit hash                                                      |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| set_as_pending_head    | False      |                                                                               |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| tmp                    | False      |                                                                               |\n+------------------------+------------+-------------------------------------------------------------------------------+\n\nfullscans.delete(org_slug, full_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete an existing full scan.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.fullscans.delete(org_slug, full_scan_id))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n\nfullscans.stream_diff(org_slug, before, after, preview)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nStream a diff between two full scans. Returns a scan diff.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.fullscans.stream_diff(\"org_slug\", \"before_scan_id\", \"after_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **before (str)** - The base full scan ID\n- **after (str)** - The comparison full scan ID\n- **preview (bool)** - Create a diff-scan that is not persisted. Defaults to False\n\nfullscans.stream(org_slug, full_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nStream all SBOM artifacts for a full scan.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.fullscans.stream(org_slug, full_scan_id))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n\nfullscans.metadata(org_slug, full_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet metadata for a single full scan\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.fullscans.metadata(org_slug, full_scan_id))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n\ndependencies.get(limit, offset)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the dependencies for the organization associated with the API Key\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.dependencies.get(10, 0))\n\n**PARAMETERS:**\n\n- **limit (int)** - The maximum number of dependencies to return\n- **offset (int)** - The index to start from for pulling the dependencies\n\ndependencies.post(files, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the dependencies for the organization associated with the API Key\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    file_names = [\n        \"path/to/package.json\"\n    ]\n    params = {\n        \"repository\": \"username/repo-name\",\n        \"branch\": \"dependency-branch\n    }\n    print(socket.dependencies.post(file_names, params))\n\n**PARAMETERS:**\n\n- **files (list)** - The file paths of the manifest files to import into the Dependency API.\n- **params (dict)** - A dictionary of the `repository` and `branch` options for the API\n\nrepos.get()\n\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositores\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.repos.get(sort=\"name\", direction=\"asc\", per_page=100, page=1))\n\n**PARAMETERS:**\n\n- **sort** - The key to sort on froom the repo properties. Defaults to `created_at`\n- **direction** - Can be `desc` or `asc`. Defaults to `desc`\n- **per_page** - Integer between 1 to 100. Defaults to `10`\n- **page** - Integer page number defaults to `1`. If there are no more results it will be `0`\n\nrepos.post()\n\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(\n        socket.repos.post(\n            name=\"example\",\n            description=\"Info about Repo\",\n            homepage=\"http://homepage\",\n            visibility='public',\n            archived=False,\n            default_branch='not-main'\n        )\n    )\n\n**PARAMETERS:**\n\n- **name(required)** - The name of the Socket Repository\n- **description(optional)** - String description of the repository\n- **homepage(optional)** - URL of the homepage of the\n- **visibility(optional)** - Can be `public` or `private` and defaults to `private`\n- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`\n- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`\n\nrepos.repo()\n\"\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositores\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.repos.repo(org_slug=\"example\", repo_name=\"example-repo\")\n\nrepos.update()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nUpdate an existing Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(\n        socket.repos.update(\n            org_slug=\"example-org\",\n            repo_name=\"example\",\n            name=\"new-name-example\",\n            description=\"Info about Repo\",\n            homepage=\"http://homepage\",\n            visibility='public',\n            archived=False,\n            default_branch='not-main'\n        )\n    )\n\n- **name(optional)** - The name of the Socket Repository\n- **description(optional)** - String description of the repository\n- **homepage(optional)** - URL of the homepage of the\n- **visibility(optional)** - Can be `public` or `private` and defaults to `private`\n- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`\n- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`\n\nrepos.delete()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete a Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.repos.delete(org_slug=\"example\", repo_name=\"example-repo\")\n\n**PARAMETERS:**\n\n- **org_slug** - Name of the Socket Org\n- **repo_name** - The name of the Socket Repository to delete\n\norg.get()\n\"\"\"\"\"\"\"\"\"\nRetrieve the Socket.dev org information\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.org.get())\n\nquota.get()\n\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the the current quota available for your API Key\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.quota.get())\n\nsettings.get()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Socket Organization Settings\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.settings.get())\n\nreport.supported()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the supported types of manifest files for creating a report\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.report.supported())\n\nDeprecated: report.list()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the list of all reports for the organization\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.report.list(from_time=1726183485))\n\n**PARAMETERS:**\n\n- **from_time (int)** - The Unix Timestamp in Seconds to limit the reports pulled\n\nDeprecated: report.delete(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete the specified report\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.report.delete(\"report-id\"))\n\n**PARAMETERS:**\n\n- **report_id (str)** - The report ID of the report to delete\n\nDeprecated: report.view(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the information for a Project Health Report\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.report.view(\"report_id\"))\n\n**PARAMETERS:**\n\n- **report_id (str)** - The report ID of the report to view\n\nDeprecated: report.create(files)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new project health report with the provided files\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    files = [\n        \"/path/to/manifest/package.json\"\n    ]\n    print(socket.report.create(files))\n\n**PARAMETERS:**\n\n- **files (list)** - List of file paths of manifest files\n\nDeprecated: repositories.get()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositores\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.repositories.get())\n\nDeprecated: sbom.view(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the information for a SBOM Report\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.sbom.view(\"report_id\"))\n\nDeprecated: npm.issues(package, version)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Issues associated with a package and version.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.npm.issues(\"hardhat-gas-report\", \"1.1.25\"))\n\n**PARAMETERS:**\n\n- **package (str)** - The name of the NPM package.\n- **version (str)** - The version of the NPM Package.\n\nDeprecated: npm.score(package, version)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Issues associated with a package and version.\n\n**Usage:**\n\n.. code-block:: python\n\n    from socketdev import socketdev\n    socket = socketdev(token=\"REPLACE_ME\")\n    print(socket.npm.score(\"hardhat-gas-report\", \"1.1.25\"))\n\n**PARAMETERS:**\n\n- **package (str)** - The name of the NPM package.\n- **version (str)** - The version of the NPM Package.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Socket Inc  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Socket Security Python SDK",
    "version": "1.0.14",
    "project_urls": {
        "Homepage": "https://github.com/socketdev/socket-sdk-python"
    },
    "split_keywords": [
        "socketsecurity",
        " socket.dev",
        " sca",
        " oss",
        " security",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6de5abd74bb39aa40e27f365711d9bc3a59e4d3367805d6c8f9e1e16a8edf3e0",
                "md5": "441d05d79fee575329ea3190d4ca1a99",
                "sha256": "c50813a66d2875c0d71dff87d6958becd2bfbe5b427d89a21f72a678ca461720"
            },
            "downloads": -1,
            "filename": "socket_sdk_python-1.0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "441d05d79fee575329ea3190d4ca1a99",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 29728,
            "upload_time": "2024-11-06T03:57:08",
            "upload_time_iso_8601": "2024-11-06T03:57:08.806976Z",
            "url": "https://files.pythonhosted.org/packages/6d/e5/abd74bb39aa40e27f365711d9bc3a59e4d3367805d6c8f9e1e16a8edf3e0/socket_sdk_python-1.0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad5f5519de7a0210562b3bf145439d022d44bc864db49fe48b15827bb19e1d8e",
                "md5": "7c0b9d98abb3667af2b8dd88d7efe763",
                "sha256": "d4c231432159733f7fb7769299d3790a047e49999b906def0bc3feb618907029"
            },
            "downloads": -1,
            "filename": "socket_sdk_python-1.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "7c0b9d98abb3667af2b8dd88d7efe763",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 28945,
            "upload_time": "2024-11-06T03:57:10",
            "upload_time_iso_8601": "2024-11-06T03:57:10.751472Z",
            "url": "https://files.pythonhosted.org/packages/ad/5f/5519de7a0210562b3bf145439d022d44bc864db49fe48b15827bb19e1d8e/socket_sdk_python-1.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 03:57:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "socketdev",
    "github_project": "socket-sdk-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "socket-sdk-python"
}
        
Elapsed time: 0.43391s