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.

pypi

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.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjourney-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 fe36867b9ace388b3aea2d332739ca8cc2d7cc68bffc3ab59266034f4fb93abd
MD5 5992e653626078ee200d19b71352ddbf
BLAKE2b-256 f02131c9847fab5fda9f322220452d20c65b47f64de5d739d39227884d1ef909

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjourney-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3de2f2aa7ef5db4eb5e4b3b708a113f204b2e88b239a6c3a26c5bb5182d1c3
MD5 752e27ff3b0e5998f757e5c6dc88feda
BLAKE2b-256 39a6ea449e3660d10a4801c5ad31103d381a4968d833944f36675b4371739bae

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