shapesinc-py
Installation
From PyPI:
pip install shapesinc -U
From GitHub:
pip install git+https://github.com/Rishiraj0100/shapesinc-py.git
Examples
Synchronous Shape Example
from shapesinc import (
shape,
ShapeUser as User,
ShapeChannel as Channel
)
my_shape = shape("API_KEY", "my_shape")
user = User("u0")
channel = Channel("cli")
while True:
inp = input(" >>> ")
r = my_shape.prompt(inp, user = user, channel=channel)
print(r.choices[0].message)
Asynchronous Shape Example
from shapesinc import (
shape,
ShapeUser as User,
ShapeChannel as Channel
)
my_shape = shape("API_KEY", "my_shape", synchronous=False)
user = User("u0")
channel = Channel("cli")
async def run():
while True:
inp = input(" >>> ")
r = await my_shape.prompt(inp, user = user, channel=channel)
print(r.choices[0].message)
import asyncio
asyncio.run(run())
Image Examples
from shapesinc import Message, MessageContent, ContentType as C
msg = Message.new("Explain this image!", [dict(url = "URL OF IMAGE", type = c.image)])
resp = my_shape.prompt(msg)
Audio Messages
from shapesinc import Message, MessageContent, ContentType as C
msg = Message.new(files = [dict(url = "URL OF AUDIO FILE", type = c.audio)])
resp = my_shape.prompt(msg)
Note
- When both audio and image files are given in one message, only audio will be processed!
- Commands like
!wackcan be normally used withShape.promptmethod.
Metadata
Release files for shapesinc 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shapesinc-0.3.4.tar.gz | 12.4 kB | Without provenance | Details for shapesinc-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shapesinc-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for shapesinc-0.3.4-py3-none-any.whl |
Total release size: 25.4 kB
Release files / shapesinc-0.3.4.tar.gz
| Download URL | shapesinc-0.3.4.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0ca8285269e9bb9b68d0192e03c16a2232305331f9e298d3c35e209e48673aa
|
|
BLAKE2b-256 checksum How to use checksums |
3184996285ae6e0e4f0ed440d73ecd4947635f7a2b879d63391a2cab8ea27447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / shapesinc-0.3.4-py3-none-any.whl
| Download URL | shapesinc-0.3.4-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1100fc2d94d458cb38f12faf376a42adbd63594a6e764c9784a4aeadbc78acd3
|
|
BLAKE2b-256 checksum How to use checksums |
17cd17efbf07f80b7bd293365806dc9db1c6c98642fa29f55a1d8443145b3cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for shapesinc 0.3.4
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.