Python library for Saltcorn API
Project description
PySaltcorn
This is python client interface for Saltcorn REST API.
Installation
$ pip3 install pysaltcorn==0.3.1
Usage
>>> import io, pysaltcorn; from pprint import pp
>>> cl = pysaltcorn.SaltcornClient("https://url-encoded-email:password@tenant.saltcorn.com")
>>> cl.login_session()
>>> cl.files_upload({'filename.txt': io.StringIO('file content\n')}, '/foldername/')
True
>>> pp(cl.files_list())
[{'filename': 'foldername',
'location': '/root/.local/share/saltcorn/netbox/foldername',
'uploaded_at': '2023-06-08T12:20:25.323Z',
'size_kb': 4,
'user_id': None,
'mime_super': '',
'mime_sub': '',
'min_role_read': 10,
's3_store': False,
'isDirectory': True}]
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
pysaltcorn-0.3.1.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file pysaltcorn-0.3.1.tar.gz
.
File metadata
- Download URL: pysaltcorn-0.3.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.19.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d69ab9eeb04664ad73089fa7f1f3130c49838c8877a66f2b7fa0d70fd55ccf9f |
|
MD5 | 36abc96ff3e28aef93bcd3abb8937c91 |
|
BLAKE2b-256 | b23b395e8051c469a56b1908541c30edaeae9dbd2395f25000ce8f20a1a6e0d0 |
File details
Details for the file pysaltcorn-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: pysaltcorn-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.19.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ae34f9e626200ae55f8445df6c63d0de4c0f864c5f8b658c9d969ad946c732 |
|
MD5 | 528af69b3af17f90b728774c1d563d23 |
|
BLAKE2b-256 | 75eb1b11fddbc99aef69acf9b3e5134201d951b09940744a67ba00f214223804 |