Skip to main content

Logo DYS Connector API Python Implementation

Project description

dys-connector

Logo DYS (Dokuman Yonetim Sistemi) API Python Implementation

Python Package: https://pypi.org/project/dys-connector

Quick Start

from dys_connector.dys_api_manager import DYSManager
import json

idm_token = "XXXXXXXXXXXXXXXXXXXXXX"
dys_base_url = "https://DYS_BASE_URL"

manager = DYSManager(dys_base_url, idm_token)

# Check state of DYS. FINE-WARNING-FAILURE
state = manager.check_state()

# Post Content to DYS
parent_folder_cid = "11111111111111111111"
doc_tag_id = "123123123123"
doc = {"file": open_file("testdoc1.html"), "filename": "testdoc1.html", "metadata": None}
f = [("file", (doc["filename"], doc["file"], "text/html"))]
dto = {
        "name": "testdoc1.html",
        "tagIds": [doc_type_id],
        "varValues": {"meta1": "value1", "meta2": "value2"},
        "documentTypeIds": []
       }
payload = {"uploadDocumentDTO": json.dumps(dto)}
res = manager.post_content(parent_folder_cid, payload, f)
print(res.text)

# Get and update document metadata
doc_cid = "abd123123123abc123123123"

meta = manager.get_doc_metadata(doc_cid)
external_url = manager.generate_external_share(doc_cid)
meta['doc_url'] = external_url
meta['dys_cid'] = cid
manager.update_metadata(cid,meta,doc_type_id_confluence)

# Copy and rename document
new_folder_cid = "123newfolder123123123"
res = manager.copy_document(doc_cid, new_folder_cid)
res2 = manager.rename_document(json.loads(res.text)["cid"], "new_doc_name")

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

dys-connector-0.2.31.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

dys_connector-0.2.31-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file dys-connector-0.2.31.tar.gz.

File metadata

  • Download URL: dys-connector-0.2.31.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.11

File hashes

Hashes for dys-connector-0.2.31.tar.gz
Algorithm Hash digest
SHA256 0db4051edbe1f22d01cda48183fb517d4cc62f079d38ed9cc8e64df9a2b2a4c5
MD5 e268f8867d4c6e397308bb205cd3cdc0
BLAKE2b-256 0901a3ba6cdc09d72043962f468c1120183e12b3dceb03ab6aa5de97a7648bcf

See more details on using hashes here.

File details

Details for the file dys_connector-0.2.31-py3-none-any.whl.

File metadata

  • Download URL: dys_connector-0.2.31-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.11

File hashes

Hashes for dys_connector-0.2.31-py3-none-any.whl
Algorithm Hash digest
SHA256 eab1b5c0e3ab720433d7695742cade2a0bf6c2cd6fefa488d4c02e16b7fc87b4
MD5 4bf692a40b1dcbfc193b80af1bcc0708
BLAKE2b-256 ba4eee09f3986b6864770ff159217ba94455ba539e95ad0966c2457f682a15a1

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