Skip to main content

A REST client for the Shortcut REST API

Project description

useshortcut

A python REST API Client for the v3 of the Shortcut API.

Copyright

Copyright (c) 2025 Ivan Willig

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This project is NOT sponsored, endorsed, or officially supported by Shortcut Software Company This is an independent, third-party open source library created by Ivan Willig. The "Shortcut" name and logo are trademarks of Shortcut Software Company.

Installation

You can install useshortcut using pip:

pip install useshortcut

Or if you're using pipenv:

pipenv install useshortcut

Quick Start

import os
from useshortcut.client import APIClient
import useshortcut.models as models

client = APIClient(api_token=os.environ.get("SHORTCUT_API_TOKEN"))

# Get the current user
current_member = client.get_current_member()

# Find all the stories that I own
search_params = models.SearchInputs(
    query=f"owner:{current_member.mention_name}",
)
# Print all the story ids that I own.
stories = client.search_stories(search_params)
for story in stories.data:
    print(story.id)

Development

Setting up the development environment

  1. Clone the repository:
git clone https://github.com/your-username/useshortcut-py.git
cd useshortcut-py
  1. Install pipenv if you haven't already:
pip install pipenv
  1. Install development dependencies:
pipenv install --dev
  1. Activate the virtual environment:
pipenv shell

Running Tests

There are several ways to run the tests:

Using invoke:

pipenv run invoke test

Using pipenv directly:

pipenv run pytest

To run tests with coverage:

pipenv run pytest --cov=useshortcut

Environment Variables

You'll need to set up the following environment variable for development:

  • SHORTCUT_API_TOKEN: Your Shortcut API token

You can create a .env file in the project root (it will be ignored by git):

SHORTCUT_API_TOKEN=your_api_token_here

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

useshortcut-0.0.9.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

useshortcut-0.0.9-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file useshortcut-0.0.9.tar.gz.

File metadata

  • Download URL: useshortcut-0.0.9.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for useshortcut-0.0.9.tar.gz
Algorithm Hash digest
SHA256 d11c9a42f9be9d11b1cd1a6ffe5890e2b2a106046a826d176141dbefeb8d6b69
MD5 c847a7b7779eaa3203713b9cd5964fc3
BLAKE2b-256 09e6ab67cbecb60b70728bf64ee08a53ab4f2f76bff9e0b6783b699266ca6d11

See more details on using hashes here.

Provenance

The following attestation bundles were made for useshortcut-0.0.9.tar.gz:

Publisher: publish.yml on iwillig/useshortcut-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file useshortcut-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: useshortcut-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for useshortcut-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 27a7141a34b79318c0821d5c75e7058952655d0c5c9e3e4f464850b0e957f4c2
MD5 40d20c1cd0a3862736b85a599fa34ebc
BLAKE2b-256 cbfc3fa484ee1b7800e605e199276b2a4739fa104b6b12cddfa9c6a646f4bce4

See more details on using hashes here.

Provenance

The following attestation bundles were made for useshortcut-0.0.9-py3-none-any.whl:

Publisher: publish.yml on iwillig/useshortcut-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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