Skip to main content

Library to manage MI files in Scribe's platform

Project description

Scribe MI

Python library to manage MI files in Scribe's platform

This library allows the management of MI (Monitoring Information) in a simple way.

You first need a Scribe account, an id_token and an api_key. The account and the api_key can both be requested at contact[atsign]scribelabs[dotsign]ai, and the id_token can be generated by the user.

One way to generate the id_token is through ScribeAuth library. The function get_tokens will return a Dictionary with three different tokens and it is necessary to extract the correct one to make it work (id_token).

It is important to use the function update_id_token before calling any other method of this library to avoid exceptions. If the id_token has expired, it will be necessary to update it again.


This library requires a version of Python 3 that supports typings.

Installation

pip install ScribeMi

1. Update id token to gain access

from ScribeMi import MI
mi = MI('url', 'api_key')
mi.update_id_token('idtoken')

2. List uploaded archives

from ScribeMi import MI
mi = MI('url', 'api_key')
archives = mi.list_archives()

3. Upload archive with file path

from ScribeMi import MI
mi = MI('url', 'api_key')
archive_name = mi.upload_archive('filename')

4. Upload archive with file in memory

from ScribeMi import MI
mi = MI('url', 'api_key')
archive_name = mi.upload_archive(open('file', 'rb'))

5. Delete archive by filename

from ScribeMi import MI
mi = MI('url', 'api_key')
deleted = mi.delete_archive('filename')

6. Get job by jobid

from ScribeMi import MI
mi = MI('url', 'api_key')
job = mi.get_job('jobid')

7. Upload job with file path

from ScribeMi import MI
mi = MI('url', 'api_key')
job_created = mi.create_job('jobid')

8. Upload job with file in memory

from ScribeMi import MI
mi = MI('url', 'api_key')
job_created = mi.create_job(open('file', 'rb'))

9. Delete job by jobid

from ScribeMi import MI
mi = MI('url', 'api_key')
deleted = mi.delete_job('jobid')

To flag an issue, open a ticket on Github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

scribemi-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file scribemi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: scribemi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for scribemi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff178e97637d981ef7dc0feae0b48781622597df0aa965e0fc50cd94b9675623
MD5 ecaf28f00040b5ae53759d005f29417b
BLAKE2b-256 ca34803b63e02b0b5fc59a012aaae6b6d5db883f5df467ab4c6bea34b6656b32

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