Helper methods to allow easier interfacing to the V1 Api of Sonatype Lift
Project description
sonatype-lift-lib
Sonatype Lift Lib contains helper methods to easily get up and running with Sonatype Lift V1 Api for introducing customised tools
Example usage
#!/usr/bin/env python3
from sonatypeliftlib.apiv1 import ApiV1, ToolNote
class ApiV1Test(ApiV1):
def tool_applicable(self):
return ApiV1.is_applicable()
def tool_run(self):
tool_notes = []
tn1 = ToolNote("Foo", "Foo Message", None, None, None)
tool_notes.append(tn1)
tn2 = ToolNote("Bar", "Bar Message", None, 1, None)
tool_notes.append(tn2)
return tool_notes
def main():
tool = ApiV1Test("Test", sys.argv)
tool.service()
if __name__ == "__main__":
main()
ApiV1 expects to receive 3 parameters, which are project_path, commit hash command where command can be applicable, name, run. The response from a run should be an array of ToolNote's.
Running the example above, for example python3 apiv1_example.py . 1234 run will yield the following output:
[
{
"name": "Foo",
"message": "Foo Message",
"line": 0
},
{
"name": "Bar",
"message": "Bar Message",
"line": 1
}
]
For further details on the Api see Lift Docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sonatypeliftlib-0.0.3.tar.gz.
File metadata
- Download URL: sonatypeliftlib-0.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c38b8d698c8b24ed19ddd9d3fdc0a30343580098178bcc00f2ca8f58d31ea6c
|
|
| MD5 |
1fe5a36ac838d9107fe476f088a40b05
|
|
| BLAKE2b-256 |
472702056b2097774195fccb4af6a5cc7e34d5b5c2b211c4620c60d763979a63
|
File details
Details for the file sonatypeliftlib-0.0.3-py3-none-any.whl.
File metadata
- Download URL: sonatypeliftlib-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae86573949a5d72aa6c64996545d968a1507693d922c408953f9b587820b29b1
|
|
| MD5 |
3aeb248d995fbee267de439c103b259c
|
|
| BLAKE2b-256 |
d9c6f471592ab70e9da09184ad2436ba23f417fb2f1c6d0beb71f7034afda61f
|