Metadata-Version: 2.1
Name: pyjourney
Version: 0.1.2
Summary: Python module for interacting with the MidJourney API
Home-page: https://github.com/agentd00nut/pyjourney
License: MIT
Keywords: journey,midjourney,api,python
Author: agentd00nut
Author-email: agentd00nut@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
Requires-Dist: requests (>=2.30.0,<3.0.0)
Project-URL: Repository, https://github.com/agentd00nut/pyjourney
Description-Content-Type: text/markdown

# PyJourney

A python module for calling the Midjourney API to get job details and for creating jobs.

Currently just trying to fix [midjourney-graph](https://github.com/agentd00nut/midjourney-graph) and figured i'd break out the api calls into a module.

[pypi](https://pypi.org/project/pyjourney/)

## TODO

- [ ] more than 35 jobs at a time.
- [ ] jobs by date range, type, and for other users
- [ ] get sepcific job details for a job and a list of jobs
- [ ] get the list of community jobs by hot, new, trending, etc.
- [ ] Searching for jobs by title, description, and tags

## Installation

```bash
pip install pyjourney
```

## Setup

Create a .env file in the root of your project and add the following:

```bash
MIDJOURNEY_COOKIE=your_cookie
MIDJOURNEY_USERID=your_userId
```

The userID should be the newer GUID version of the userid, not the old integer version.
The cookie can be taken from the cookie header in your browser when you're logged in to Midjourney for any request against the API.

## Usage

```python
from pyjourney import MidjourneyAPI


api = MidjourneyAPI()        #Loads your cookie and userId from the .env file  (required for now.)
request = api.recent_jobs()  # Defaults to fetching the most recent 35 jobs you've done.
print(request.status_code)  # request.json() should work if this is 200 :)
```

