Python Library for reading JIRA Data from JSON API
### What Does it Do
When building apps that integrate with JIRA using its API, its often repetitive to parse and read out data from the objects you're sent. JIRAPy handles the parsing and storing of data so that you can access it with easy to use handlers like `jiraticket.summary` or `jiraticket.tags`, and since it uses native Python data formats and objects, filtering through data is as simple as `for tag in jiraticket.tags`.
It also includes a few convenience functions to make basic operations in Python more friendly, including the `add_comment()` function which when provided with a valid User/Pass combination can post comments to the remote JIRA instance for that ticket. If you need to comment on a JIRA with Self-Signed SSL, see the section 'My JIRA Uses Self-Signed Certificates'
JIRAPy works with data you already have, either from the APIs or from a WebHook. If you want a complete integration with a running JIRA instance that can pull down data for you, I highly recommend the [PyContribs](https://github.com/pycontribs) Package '[Jira](https://github.com/pycontribs/jira)' which provides a fantastic, complete, drop in solution.
### Why
I was writing bots to automatically perform actions when a ticket was raised to our board and found that I was recreating the same functions every time I created a new bot. This keeps all the helpers in an easy to import class.
### How Do I Install It
For now, you need to clone this Git repo and copy it into your project, but soon you'll be able to run `pip install jirapy` to get it anywhere.
### How Do I Use It
Import the class(es) you require from the module:
`from jirapy import JiraTicket`
then create a JIRA object from data returned from the API:
```
ticketdata = get_ticket("https://neko-design.jira.com/api/rest/2/issue/jirapy-1")
jiraticket = JiraTicket(ticketdata)
```
and now you can read back values from the data:
```
print jiraticket.summary
> Ticket Summary
print jiraticket.reporter
> E. Neko
jiraticket.add_comment("Updated System, Please Check", "username", "password")
> 200
```
### My JIRA Uses Self-Signed Certificates
I've included the option to turn off SSL Verification for the comments feature. When you create the JiraTicket object, set the optional `verifyssl` parameter to `False`:
```
ticketdata = get_ticket("https://neko-design.jira.com/api/rest/2/issue/jirapy-1")
jiraticket = JiraTicket(ticketdata, False)
# Or with a Named Parameter
jiraticket = JiraTicket(ticketdata, verifyssl=False)
```
### Testing
To run the tests, launch `tests/ticketTest.py` and it will run though the expected values, producing a report similar to the below:
```
bash-3.2$ python ticketTest.py
WARNING:root:Ticket Has no Labels
WARNING:root:Ticket Has no Components
[INFO] Starting JIRAPy Tests
[INFO] ---------------------------------------------
[INFO] TEST Ticket Summary SUCCESS
[INFO] TEST Ticket Description SUCCESS
[INFO] TEST Ticket Key SUCCESS
[INFO] TEST Ticket URL SUCCESS
[INFO] TEST Ticket Reporter SUCCESS
[INFO] TEST Ticket Status SUCCESS
[INFO] TEST Ticket Labels SUCCESS
[INFO] TEST Ticket Labels (Empty) SUCCESS
[INFO] TEST Ticket Components SUCCESS
[INFO] TEST Ticket Components (Empty) SUCCESS
[INFO] ---------------------------------------------
[INFO] 0 Tests Failed. 10 Passed.
[INFO] TESTS PASSED. All Tests Passed
```
Metadata
Release files for jirapy 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jirapy-0.1.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jirapy-0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / jirapy-0.1.tar.gz
| Download URL | jirapy-0.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
864c6f9821b9749a26bb98b5981dbef103e199341ab2c8c31fcdb2af31ed19f7
|
|
BLAKE2b-256 checksum How to use checksums |
0b41e6d8d2ad39fa7d9d69afc02d8203dff8b5b0576469251ce260c9aad601af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jirapy-0.1-py2.py3-none-any.whl
| Download URL | jirapy-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
de484a94df60b3880712309ca2c9e0fb352c5cf07cbe77ed035101bac4942683
|
|
BLAKE2b-256 checksum How to use checksums |
c4396c86dd8bf5461901353de0db85c77dbe3dd9464e5c10d922909733cabbf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jirapy 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.