Welcome to the CTERA Python SDK#

The CTERA SDK for Python provides developers with powerful tools to automate the deployment and configuration of the CTERA Global File System, streamline data management tasks, and seamlessly integrate CTERA’s global namespace with their applications.

Key Features#

  1. Configuration Management:
    1. Portal Management

    2. Edge Filer Management, including remote access.

  2. Managing Data Discovery and Migration Jobs

  3. File Data Management APIs for CTERA Edge Filer and CTERA Portal.

  4. Data Services Framework:
    1. Subscribing to File System Notifications

    2. CTERA Direct IO, enabling parallel high-performnace retrieval directly from object storage.

Library Installation#

$ pip install cterasdk

Getting Started#

Edge#

import cterasdk.settings
from cterasdk import Edge

def main():
    cterasdk.settings.edge.syn.settings.connector.ssl = False  # for unstrusted or self-signed certificates
    with Edge('192.168.0.1') as edge:
        edge.login('admin-username', 'admin-password')
        print('Hostname: ', edge.config.get_hostname())
        print('Location: ', edge.config.get_location())

        edge.config.set_location('1234 Sycamore Lane, Humorville, NY 12345')
        print('Location: ', edge.config.get_location())

if __name__ == '__main__':
    main()

This prints:

Hostname:  vGateway-01ad
Location:  None
Location:  1234 Sycamore Lane, Humorville, NY 12345

Portal#

import cterasdk.settings
from cterasdk import GlobalAdmin

def main():
    cterasdk.settings.core.syn.settings.connector.ssl = False  # for unstrusted or self-signed certificates
    with GlobalAdmin('tenant.ctera.com') as admin:
        admin.login('admin-username', 'admin-password')
        for user in admin.users.list_local_users(include=['firstName', 'lastName', 'email']):
            print(user)

        admin.portals.browse_global_admin()
        for administrator in admin.admins.list_admins(include=['email']):
            print(administrator)

if __name__ == '__main__':
    main()

This prints:

{
    "_classname": "PortalUser",
    "email": "alice.wonderland@acme.com",
    "firstName": "Alice",
    "lastName": "Wonderland",
    "name": "alice"
}
{
    "_classname": "PortalAdmin",
    "email": "matt@ctera.com",
    "name": "matt"
}
{
    "_classname": "PortalAdmin",
    "email": "saimon@ctera.com",
    "name": "saimon"
}

Source Code#

The project is hosted on GitHub.

Documentation#

User documentation is available on Read the Docs.

Bug Reporting#

Feel free to submit feature requests or issues via ctera/ctera-python-sdk#issues

Authors and License#

The cterasdk package is written mostly by Saimon Michelson and Ron Erez.

It’s Apache 2 licensed and freely available.

Feel free to improve this package and send pull requests to GitHub.

Table of Contents#

Module Indices#