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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjourney-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5a09d91bdd6b423bf7c838e423cf5721c14e4f9f3911545a508145910fec0dd1
MD5 039e77b3660292f5b13196b5cb740fb0
BLAKE2b-256 c22d476b7ebd88aee1e942aba184daeff3fa8a30f75d5f6898c0306feb4e6f1e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjourney-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19378da1eb3479312105aa3b118361f2affb3896ff78ba1569fc3c4cf3311ff4
MD5 dbb8b1ee7d042f7b68dfc27d9f8a755d
BLAKE2b-256 60c9d49340e0b5d4bef89a1c4253967630896ad51dc32b81f7f7515251d20e04

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