OpenAI API Quickstart - Python example app
This is an example pet name generator app used in the OpenAI API quickstart tutorial. It uses the Flask web framework. Check out the tutorial or follow the instructions below to get set up.
Setup
-
If you don’t have Python installed, install it from here.
-
Clone this repository.
-
Navigate into the project directory:
$ cd openai-quickstart-python
-
Create a new virtual environment:
$ python -m venv venv $ . venv/bin/activate
-
Install the requirements:
$ pip install -r requirements.txt
-
Make a copy of the example environment variables file:
$ cp .env.example .env
-
Add your API key to the newly created
.envfile. -
Run the app:
$ flask run
You should now be able to access the app at http://localhost:5000! For the full context behind this example app, check out the tutorial.
Metadata
Release files for openai-quickstart-python 0.4.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 | |
|---|---|---|---|
| openai_quickstart_python-0.4.0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openai_quickstart_python-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / openai_quickstart_python-0.4.0.tar.gz
| Download URL | openai_quickstart_python-0.4.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09bfdb53e608a982453dcc9a58d4473ba48b42adc2c6c179d1fc3e6d31ef425e
|
|
BLAKE2b-256 checksum How to use checksums |
35e36879f2911943dc2ddf6a4a5a2785bd86d66a05883f3493b8022543aad6f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.2 Linux/5.10.0-23-amd64
|
Release files / openai_quickstart_python-0.4.0-py3-none-any.whl
| Download URL | openai_quickstart_python-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7eb55b4fb53341d92c754c7a3a93796b36a089e7fc7732ad726bf9656074dbe7
|
|
BLAKE2b-256 checksum How to use checksums |
8859ec6f3831095f21bbf71dc8c37141e48af3526a7f299951303a211c285615
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.2 Linux/5.10.0-23-amd64
|