Skip to main content

EtuDataSphere

PyPI Python 3.6, 3.7, 3.8 GitHub Pull Requests License

This is a Python library for interacting with Yandex DataSphere API. It provides functions to perform various operations such as getting organizations, billing accounts, projects, managing organization members, creating projects, checking operation status, and adding contributors to projects.

Installation

Install the current version with PyPI:

pip install etudatasphere

Or from GitHub:

pip install https://github.com/sesh00/etudatasphere/archive/main.zip

Usage

Importing the DataSphereManager

from etudatasphere import DataSphereManager

Initializing DataSphereManager

oauth token

oauth_token = ""
dataSphereManager = DataSphereManager(oauth_token)

Request for Organizations and Their Identifiers

Retrieves a list of organizations and their identifiers.

dataSphereManager.get_organizations()

Request for Role Identifiers in DataSphere

Retrieves a list of possible roles in DataSphere.

dataSphereManager.get_possible_ds_roles()

Request for Payment Accounts

Retrieves a list of billing accounts.

dataSphereManager.get_billing_accounts()

Request for Members of a Specific Organization

Retrieves members of a specific organization

org_id = "" # From the section with the request for organizations
dataSphereManager.get_organization_members(org_id)

Request for the List of Organization Communities

Retrieves communities of a specific organization.

org_id = "" # From the section with the request for organizations
dataSphereManager.get_organization_communities(org_id)

Project Creation, Participant Addition, Settings

Creates a project, adds contributors, and configures settings.

community_id = "" # From the section with the request for communities
name = "" # Project name
description = "" # Project description
vmInactivityTimeout = "100s" # Release resources in the specified format, where 300 is the number of seconds of inactivity

dataSphereManager.create_project(
                        community_id = community_id,
                        name = name,
                        description = description,
                        vmInactivityTimeout = vmInactivityTimeout)

Operation Status Check

Checks the status of a specific operation.

id_operation = "" # Operation identifier from the section with project creation
dataSphereManager.check_operation_status(id_operation)

community_id = "" # From the section with project creation
dataSphereManager.get_projects(community_id=community_id)

Project Request

Retrieves information about projects.

project_id = "" # Identifier of the created project from the section with checking operation status
dataSphereManager.get_projects(project_id=project_id)

Adding Participants to a Project

Adds contributors to a project.

project_id = "" # Identifier of an existing project
contributors = [
        {
        "id": "", # Identifier of an organization member from the section with requesting members of a specific organization
        "role":"datasphere.communities.admin" # Possible role of a member from the section with requesting role identifiers
        },
        {
        "id": "",
        "role": "datasphere.communities.admin"
        }
    ]

dataSphereManager.add_contributors(project_id=project_id, contributors=contributors)

Update all community projects

community_id = ""
vm_inactivity_timeout = "100s"
unit_balance = 100
dataSphereManager.update_all_community_projects(community_id, vm_inactivity_timeout, unit_balance)

Get & Update unit balance

project_id = ""
unit_balance = 100
print(dataSphereManager.get_unit_balance(project_id))
dataSphereManager.update_unit_balance(project_id, unit_balance)

Contributing

Contributions to EtuDataSphere are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository

License

The module is available as open source under the terms of the MIT License

Metadata

Release files for etudatasphere 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etudatasphere 0.1.3
File Size Uploaded Provenance Actions
etudatasphere-0.1.3.tar.gz 9.8 kB Without provenance Details for etudatasphere-0.1.3.tar.gz

Release files / etudatasphere-0.1.3.tar.gz

Download URL etudatasphere-0.1.3.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
50c267ef19c893d2f05a3a864d4224b72b42eb76b99b8fe89f64018ea02cb109
BLAKE2b-256 checksum
How to use checksums
878ac1c73dde6194c453b0c81dc3f23c74f558f2597efd997c9ea0228050fa45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.0

Security for etudatasphere 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page