Python DALL E
Python library for interacting with OpenAI's Dall-E 2 AI
Setup
To get access to Dall-E 2's API you need to join the waitlist and wait to be accepted which can be found here.
- To get the your unique session key you need to go to https://labs.openai.com/.
- Open the Network Tab in Developer Tools in your browser.
- Send an image request in the input box.
- In the network tab you'll find a POST request to https://labs.openai.com/api/labs/tasks.
- In the POST request headers you'll find your session key in the "Authorization" header, it'll look something like "sess-xxxxxxxxxxxxxxxxxxxxxxxxxxxx".
Usage
import DALLE, asyncio
dalle = DALLE.DALLE("sess-xxxxxxxxxxxxxxxxxxxxxxxxxxxx")
async def main():
print("Generating images...")
images = await dalle.generate("Kitten")
print(images)
asyncio.run(main())
Output
[
{
id: 'generation-QyXXdJP165TiSpSrzBqAo6IS',
object: 'generation',
created: 1659149946,
generation_type: 'ImageGeneration',
generation: {
image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'
},
task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',
prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',
is_public: false
},
{
id: 'generation-UNJiRu5dzbvJYo8FVnZs5SCS',
object: 'generation',
created: 1659149946,
generation_type: 'ImageGeneration',
generation: {
image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'
},
task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',
prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',
is_public: false
},
{
id: 'generation-XCqpvMF0araPjFczwwfDGHGv',
object: 'generation',
created: 1659149946,
generation_type: 'ImageGeneration',
generation: {
image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'
},
task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',
prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',
is_public: false
},
{
id: 'generation-sSo1TufL7d4OSGEBTwRTMtxv',
object: 'generation',
created: 1659149946,
generation_type: 'ImageGeneration',
generation: {
image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'
},
task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',
prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',
is_public: false
}
]
Metadata
Release files for Python-DALLE 1.1.0
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 |
|---|---|---|---|---|
| python_dalle-1.1.0.tar.gz | 2.9 kB | Without provenance | Details for python_dalle-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_dalle-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for python_dalle-1.1.0-py3-none-any.whl |
Total release size: 7.2 kB
Release files / python_dalle-1.1.0.tar.gz
| Download URL | python_dalle-1.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52ccfddf90a798517cb352804a54a7ad4d70f1c638eb2894c835057bbc3bf4fa
|
|
BLAKE2b-256 checksum How to use checksums |
7eb1dbb8e1ab325e9c0a3ee954dc3cfc1fa54dd53d5f07d5dcfadebf9ff99ba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / python_dalle-1.1.0-py3-none-any.whl
| Download URL | python_dalle-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5244c61ba232b95a2ccca25bf2fa696c4632db87dd9af2874e15fcf02dbdc314
|
|
BLAKE2b-256 checksum How to use checksums |
34a78d939a8c45c580ace66a0aed58afed9a3f8583b2cff4a43d21dec445dfca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for Python-DALLE 1.1.0
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.