Skip to main content

Python module for interacting with the MidJourney API

Project description

PyJourney

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

Currently just trying to fix midjourney-graph and figured i'd break out the api calls into a module.

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

pip install pyjourney

Setup

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

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

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 :)

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

pyjourney-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

pyjourney-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyjourney-0.1.1.tar.gz.

File metadata

  • Download URL: pyjourney-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.7 Windows/10

File hashes

Hashes for pyjourney-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ae2a4796b8342a30f072d1a1b466a7d533c50883e1356d25845728e2ce2b02f
MD5 6354b4bc171a13791bb8e7a8935df4a9
BLAKE2b-256 35b0328223f74c9eac92ce98e377be51d5850e5c094b8af80ff9ce153c83c62f

See more details on using hashes here.

File details

Details for the file pyjourney-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyjourney-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.7 Windows/10

File hashes

Hashes for pyjourney-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3138aa39227937b7a7e70c82ce56d25990a298f952552ca58e369cb304f5e57
MD5 a25a16a744f8a207b3c45daaf3f5e3d5
BLAKE2b-256 17a7622c6428dbc8d0084214cd00346024cb4c0a80aeec0bd70f477fab4e2e75

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page