A Python library to interact with the Codegyan API
Project description
Codegyan Python Library
A Python library to interact with the Codegyan API.
Installation
pip install codegyan
Usage
from codegyan import Codegyan
client = Codegyan(api_key='your_api_key', client_id='your_client_id')
# Compiler API
result = client.compilerApiClient.compile(lang='python', code='print("Hello, World!")')
print(result)
Testing
Create test files in the tests
directory to ensure your library works as expected.
tests/test_compiler.py
import unittest
from codegyan.compiler import CompilerApiClient
class TestCompilerApiClient(unittest.TestCase):
def setUp(self):
self.client = CompilerApiClient(api_key='your_api_key', client_id='your_client_id')
def test_compile(self):
result = self.client.compile(lang='python', code='print("Hello, World!")')
self.assertIn('output', result)
if __name__ == '__main__':
unittest.main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.