Skip to main content

A Python library to interact with the Codegyan API

Project description

Codegyan Python Library

A Python library to interact with the Codegyan API.

Language PyPI - Downloads PyPI - License GitHub Downloads (all assets, all releases)

Installation

pip install codegyan

Usage

Before using the Pakage, you need to obtain an API key and client ID from Codegyan. Follow these steps to get your API credentials:

  1. Sign Up/Login: If you don't have an account, sign up for a Codegyan account. If you already have an account, log in to your dashboard.

  2. Get Credentials: Once logged in, navigate to the Developer Console or API settings in your account dashboard. Here, you will find your API key and client ID. Copy these credentials and use them when initializing the Pakage in your code.

Here's an example of how to initialize the npm pakage with your API key and Client ID:

from codegyan import Codegyan

# Define your API credentials
api_key = "YOUR API KEY"
client_id = "YOUR CLIENT ID"

# Initialize the Codegyan client
client = Codegyan(api_key, client_id)

# Define the language and code to be compiled
lang = "python"
code = 'print("Hello, World!")'

# Use the Compiler API to compile the code
result = client.compilerApiClient.compile(lang, code)
print(result)

Replace YOUR_API_KEY and YOUR_CLIENT_ID with your actual API key and Client ID provided by Codegyan. Pass the code you want to compile to the compile function.

Tests

To run the unit tests, use the following command:

python -m unittest discover tests

Make sure to replace tests with the actual path to your test directory if it's different.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT license. See the LICENSE file for details.

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

codegyan-1.0.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

codegyan-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file codegyan-1.0.0.tar.gz.

File metadata

  • Download URL: codegyan-1.0.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for codegyan-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3cc9704a21e20298c5dac84740e7f879d13b31cf5a9062d0bac234dc099f4452
MD5 4d5f6cb75b3e4ac22e13ce658fed1202
BLAKE2b-256 dd1c0357ce1aa285a064c3e7d70432c9b3f38dc049f9491ac4b5f5613eb9be23

See more details on using hashes here.

File details

Details for the file codegyan-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: codegyan-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for codegyan-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7410ca78b7a906aebcae2ba7cff3d1fdfb352d26cf808de616002511345adf69
MD5 09dc5acff66b96b803ac3cd4a05df4b5
BLAKE2b-256 32a0ecba39eeda99cb47a311497119ceccebbcea5b395cefa4e037da81589c81

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page