lucidicai 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: lucidicai
3
+ Version: 0.1.0
4
+ Summary: Lucidic AI API
5
+ Author: Andy Liang
6
+ Author-email: andy@lucidic.ai
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+
13
+ Best API Ever
@@ -0,0 +1 @@
1
+ Best API Ever
@@ -0,0 +1,6 @@
1
+ from .api import LucidicAPI
2
+
3
+ __all__ = ["LucidicAPI"]
4
+
5
+ __version__ = "0.1.0"
6
+ __author__ = "Lucidic AI"
@@ -0,0 +1,25 @@
1
+ import requests
2
+
3
+ class LucidicAPI:
4
+ def __init__(self, api_key: str):
5
+ self.api_key = api_key
6
+ self.headers = {"Authorization": f"Api-Key {self.api_key}"}
7
+ self.base_url = "https://dashboard.lucidic.ai/demo/api/v1"
8
+ self.endpoints = {
9
+ "verifyAPIKey": "/testendpoint",
10
+ }
11
+ def verifyAPIKey(self, testprompt="Tell me a joke"):
12
+ url = f'{self.base_url}/{self.endpoints["verifyAPIKey"]}'
13
+ try:
14
+ response = requests.get(
15
+ url,
16
+ headers=self.headers,
17
+ params={
18
+ 'prompt': testprompt,
19
+ }
20
+ )
21
+ response.raise_for_status()
22
+ return response.json()['response']
23
+ except Exception as e:
24
+ print(f"Error during API Call: {e}")
25
+ raise
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: lucidicai
3
+ Version: 0.1.0
4
+ Summary: Lucidic AI API
5
+ Author: Andy Liang
6
+ Author-email: andy@lucidic.ai
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+
13
+ Best API Ever
@@ -0,0 +1,11 @@
1
+ README.md
2
+ setup.py
3
+ lucidicai/__init__.py
4
+ lucidicai/api.py
5
+ lucidicai.egg-info/PKG-INFO
6
+ lucidicai.egg-info/SOURCES.txt
7
+ lucidicai.egg-info/dependency_links.txt
8
+ lucidicai.egg-info/requires.txt
9
+ lucidicai.egg-info/top_level.txt
10
+ tests/__init__.py
11
+ tests/test_api.py
@@ -0,0 +1 @@
1
+ requests>=2.25.1
@@ -0,0 +1,2 @@
1
+ lucidicai
2
+ tests
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="lucidicai",
5
+ version="0.1.0",
6
+ packages=find_packages(),
7
+ install_requires=[
8
+ "requests>=2.25.1"
9
+ ],
10
+ author="Andy Liang",
11
+ author_email="andy@lucidic.ai",
12
+ description="Lucidic AI API",
13
+ long_description=open("README.md").read(),
14
+ long_description_content_type="text/markdown",
15
+ classifiers=[
16
+ "Programming Language :: Python :: 3",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: OS Independent",
19
+ ],
20
+ python_requires=">=3.6",
21
+ )
File without changes
@@ -0,0 +1,10 @@
1
+ import pytest
2
+ from lucidicai.api import LucidicAPI
3
+
4
+ def test_verify_api_key(mocker):
5
+ mocker.patch("requests.get", return_value=mocker.Mock(status_code=200, json=lambda: {"response": 'lmao'}))
6
+
7
+ apiWrapper = LucidicAPI(api_key="dummy_api_key")
8
+ response = apiWrapper.verifyAPIKey("test-endpoint")
9
+
10
+ assert response