A Python API Wrapper
Project description
Cu3t0mAPI
A Python api wrapper.
About
Cu3t0mApi is an API wrapper for my API that I made for fun in around 20 minutes. As of writing, there are only a few endpoints but I plan to add more. My code is badly and lazily written but hey, it works!
Memes
Cu3t0mAPI.memes(topic, amount)
# Default topic is the subreddit 'memes' and default amount is '1'.
Will return Memes from Reddit.
Usage:
from Cu3t0mAPI import API
rs = API("api_key")
memes = rs.memes()
print(memes)
{"code":200,"post_link":"https://redd.it/r9i13b","subreddit":"memes","title":"Friendship Destroyer in a nutSHELL.","url":"https://i.redd.it/a87g8erqsq381.jpg","ups":189,"author":"1Shadowspark1","spoilers_enabled":true,"nsfw":false,"image_previews":["https://preview.redd.it/a87g8erqsq381.jpg?width=108&crop=smart&auto=webp&s=c1484e18100a3b6d2ba903ade6ecf186d069c9ee","https://preview.redd.it/a87g8erqsq381.jpg?width=216&crop=smart&auto=webp&s=3dba4111ceb5a328f971a3c55b84e251d52bd20c","https://preview.redd.it/a87g8erqsq381.jpg?width=320&crop=smart&auto=webp&s=8a0f4a2742e252fa63828cbe63bd00ba0cbbe479","https://preview.redd.it/a87g8erqsq381.jpg?width=640&crop=smart&auto=webp&s=1ae7bab3747227b0458b676fcd0a183ea9595bb8","https://preview.redd.it/a87g8erqsq381.jpg?width=960&crop=smart&auto=webp&s=44141f4bc79d4361a641b51b1a00724fb6076e62","https://preview.redd.it/a87g8erqsq381.jpg?width=1080&crop=smart&auto=webp&s=9ea0bad596f1be4f292fe090d89fe343e7cc0fb3"]}
Ai Response
Cu3t0mAPI.ai_response(question, prev_question=None)
# Question is a required argument.
Will return an AI response.
Usage:
from Cu3t0mAPI import API
rs = API("api_key")
x=69
print("Simple use of the 'ai_response' function.")
while x == 69:
q = input("")
resp = rs.ai_response(q)
response = json.loads(resp)
print(response["response"])
Simple use of the 'ai_response' function.
Hi
Wassup man, how you doing.
im good
Glad to hear it. Want to read any news?
ok
<a href="http://www.msn.com/en-us/news">click here to search and view news</a>
why lol
The explanation is rather complicated.
ig it is
I see. May I ask you some simple questions?
ok
Great! How many languages can you speak?
3
3 is fine although the more the better.
bruh
I'm very enthusiastic.
clearly
Yes, it's obvious.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Cu3t0mAPI-1.8.7.tar.gz.
File metadata
- Download URL: Cu3t0mAPI-1.8.7.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cea36872076d30aa6574599986be67da5ec436dac71d0e60699240a615b05b6
|
|
| MD5 |
75334de5313e2ab33c42ea9eca1ff83c
|
|
| BLAKE2b-256 |
d19506578fabd4856b4bbf6a765927b992fa92c5fa71941f9e6d0b39f79a0ca6
|
File details
Details for the file Cu3t0mAPI-1.8.7-py3-none-any.whl.
File metadata
- Download URL: Cu3t0mAPI-1.8.7-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
075bde7d7f553d136ad2433f6f8a4c44fdb8f50bf4bfc35f8bfa945587246db5
|
|
| MD5 |
01136c8864c1cbaec58460377a22130a
|
|
| BLAKE2b-256 |
7f9551a9be1ec3b5f29515f3d582c3f0ebbcdeaf77ce13ba8eee7cb0ac2870dd
|