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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjourney-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 58f22650ba299e6e3939e901170c8e3b5580a2bdc0a1723140d12c387f4b42dd
MD5 c5c2d5a15c9df0f0011997efb18b962e
BLAKE2b-256 14195a94f70f4b28c83184a0c40289eec48202a30a19922d811b64dcbb5f3264

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjourney-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a4012239bfd978edde63c8fc0c96e80232f1d62133ddd3a21f630148936fbaf2
MD5 909b32141f063d096579aabdc0924ec4
BLAKE2b-256 246f0e96ae26a1a2abe313cc33597ca4fe851b3787e82b47ca223d1ff62384f6

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