Skip to main content

Python library for interacting with YouTrack via REST API supporting python3

Project description

Features modified

  • Ported to python3
  • Added to_dict method on YouTrack objects

YouTrack REST API Client Library for Python

This is a Python client library that you can use to access the REST API for JetBrains YouTrack. Previously, this repository also included command-line tools for importing issues from other issue trackers. We have created a separate repository to store scripts that use this library.

The primary purpose of this library is to support migration to YouTrack, but you are welcome to build integrations with it as well. If you choose to work with this library, please be mindful of the following limitations:

  • We don't provide any documentation for this library. You can either learn through trial and error or by dissecting the import scripts in the linked repository.
  • This library references an older version of the YouTrack REST API. Many of the newer features in YouTrack are not supported.

We will continue to support this library with updates that are required to support issue import. Other issues that are not import related may be closed. Our intention is to eventually publish a fully-documented library that uses the latest version of the YouTrack REST API and is also compatible with Python 3.

Compatibility

This client library and the import scripts that use the library are compatible with Python 2.7+. Python 3 releases are not supported.

This library supports YouTrack Standalone versions 5.x and higher as well as the current version of YouTrack InCloud. The REST API is enabled by default in all YouTrack installations.

Getting Started

This package has been published to PyPI and can be installed with pip. pip install youtrack

Authentication

To communicate with YouTrack, you need a connection.

  • The preferred method is to use a permanent token for authentication requests. You can generate your own permanent tokens in your user profile. For instructions, refer to the YouTrack documentation.
  • You can also authenticate using a login and password, however, these values are printed in plain text and expose your credentials in your client application.
from youtrack.connection import Connection as YouTrack

# authentication request with permanent token
yt = YouTrack('https://instance_name.myjetbrains.com/youtrack/', token='perm:abcdefghijklmn')

# versus authentication with username and password
yt = YouTrack('https://instance_name.myjetbrains.com/youtrack/', login='username', password='password')

This request requires that you specify the base URL of the target YouTrack server. For YouTrack InCloud instances, your base URL includes the trailing /youtrack, as shown in the previous example.

Once you have established a connection, your credentials are cached for subsequent requests.

Supported Operations

Most of the operations that are supported by the YouTrack REST API are mapped to methods for the Connection object. The Python client library, however, supports a simplified set of parameters. In some cases, like createIssue, the Python method supports a custom set of request parameters.

To learn more about the YouTrack REST API, refer to the YouTrack documentation.

YouTrack Support

Your feedback is always appreciated.

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

youtrack-0.1.69.tar.gz (32.4 kB view details)

Uploaded Source

File details

Details for the file youtrack-0.1.69.tar.gz.

File metadata

  • Download URL: youtrack-0.1.69.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for youtrack-0.1.69.tar.gz
Algorithm Hash digest
SHA256 7698adb079b5146ff35f411de7919d2bb2c6ccaced346daa342aec6c68f0ff7f
MD5 c336ea4c07946bcfd6bc467c8f893814
BLAKE2b-256 667aa59bb759deb4b9c5e154366c9c3c3dad6b80f44691c4e7b0aefb0658f251

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