Skip to main content

Jira Asset Manager

made-with-python GitHub release (release name instead of tag name) GitHub

Manage Jira assets in your code or CLI.

Requirements

  • Python 3.8+

Install

pip install jira-amt

How-to

You need to add these environment variables to use the CLI:

Variable Description
JIRA_SERVER Jira server address like https://jira.domain.com
JIRA_PAT Your personal access token

After setting these variables, you can configure the CLI:

jira-amt init

This command will get everything from your Jira server and save them to ~/.jira directory for later use. With this data, you don't need to know/use ID of each asset/attribute.

CLI

There is some commands to manage assets. Check them using the --help flag.

Create assets

The asset creation in CLI is not make sense, because you need to enter all attributes in command line. But you can use it in your code.

Update assets

You can update asset's attribute using it's name. The script will get the asset id from the name automatically.

jira-amt attr <schema> <object> <asset name> <attr name> <attr value>
jira-amt attr "ITSM" "Servers" "Server-1" "IP" "1.2.3.4"

Add comment

You can add comment to an asset using it's name. The script will get the asset id from the name automatically.

jira-amt comment <schema> <object> <asset name> <comment>
jira-amt comment "ITSM" "Servers" "Server-1" "This is a comment"

Package

You can use this package in your code to manage Jira assets.

from jira_amt.jira import JiraAssetHandler

jira = JiraAssetHandler(
    server="https://jira.domain.com",
    pat="ABCD1234"
)

Get asset

asset = jira.get_asset("schema", "object", "asset's name")

print(asset.text)

Create asset

input = {
    "Name": "Server-1",
    "Status": "Running",
    "Environment": "Production",
    "OS": "Debian",
    "IP": "1.2.3.4"
}

asset = jira.create_asset("schema", "object", input)

Update asset

asset = jira.get_asset("schema", "object", "asset's name")

print(asset.text)

Add comment

result = jira.add_comment("schema", "object", "asset's name", "comment")

print(result.status_code)

Support 💛

Donate with Bitcoin Donate with Ethereum

Contributing 🤝

Don't be shy and reach out to us if you want to contribute 😉

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature

Metadata

Release files for jira-amt 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jira-amt 1.3.1
File Size Uploaded
jira_amt-1.3.1.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jira-amt 1.3.1
File Interpreter ABI Platform
jira_amt-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / jira_amt-1.3.1.tar.gz

Download URL jira_amt-1.3.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
408d676cad2147c5e317cabb555057323b5a4ee990be4bcfa9f5e6bed04a82ba
BLAKE2b-256 checksum
How to use checksums
2403cc09b6c58f402a34c5d8e9fdd3a8df9544f7c8b88bdb70a67863646521d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure

Release files / jira_amt-1.3.1-py3-none-any.whl

Download URL jira_amt-1.3.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c87337f3b53969a8a9a93024d01d0450a4c99b60371f849338abc00c9ba9b73
BLAKE2b-256 checksum
How to use checksums
02dc1a02ae6bbd4fd0422f301ecdede736f123d7f95a44f0b330455a1ae28c21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page