Skip to main content

CODEGPT Python Package

This package provides you with an easy way to interact with the CODEGPT API in your Python applications.

Install

To install the package, simply run the following command:

pip install codegpt-sdk

Usege

Below is a sample code demonstrating how to use the CODEGPT package in your Python application:

# Import the package
import asyncio
from codegpt.agent import Agent

def main():
    # Replace with your actual API key and URL ID
    api_key = "your_api_key_here"
    agent_id = "your_agent_id_here"

    # Initialize the CODEGPT class
    agent_instance = Agent(api_key, agent_id)

    # Optional: update API key or URL ID if needed
    agent_instance.set_api_key("new_api_key")
    agent_instance.set_agent_id("new_agent_id")

    # Create the prompt
    prompt = "tell me short story about blue turtle"

    # Make a completion request
    response = asyncio.run(agent_instance.completion(prompt, stream=False))

    # Handle the response as needed
    print(response)

if __name__ == "__main__":
    main()

Metadata

Release files for codegpt-sdk 1.0.3

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

Source distribution (sdist)

Source distribution for codegpt-sdk 1.0.3
File Size Uploaded Provenance
codegpt-sdk-1.0.3.tar.gz 3.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for codegpt-sdk 1.0.3
File Interpreter ABI Platform
codegpt_sdk-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / codegpt-sdk-1.0.3.tar.gz

Download URL codegpt-sdk-1.0.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f851108a9e28017d4e67f1f63dc0bdf4302fae066ac55993bc702f441eb7f38a
BLAKE2b-256 checksum
How to use checksums
58955d53a37fdbda67a38661d1c52dce9cdf84cdaf6ffca6fc20bca1adbdd050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Release files / codegpt_sdk-1.0.3-py3-none-any.whl

Download URL codegpt_sdk-1.0.3-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfb93460f8543cd6447f9ad1158c8fd174944702f4855af772987c07cdf624fe
BLAKE2b-256 checksum
How to use checksums
8cb589cc9bec4f1c4c1cabdf22bb93ca06b31e3266a87341760f32a263e17e85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Security for codegpt-sdk 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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