### Initialize and Set Project Source: https://github.com/rogii-com/python-sdk/blob/develop/README.md Demonstrates how to initialize the `SoloClient` with credentials and set the active project by name. It also shows how to retrieve well data as a dictionary or a Pandas DataFrame. ```Python from rogii_solo import SoloClient solo_client = SoloClient(client_id='my-client-id', client_secret='my-client-secret') project = solo_client.set_project_by_name('My project') wells = project.wells wells_data = wells.to_dict() # List of dicts wells_df = wells.to_df() # DataFrame ``` -------------------------------- ### Render Python API Documentation Structure Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/module_summary.rst Jinja2 macros for generating structured API documentation from Python code objects. These macros handle formatting class summaries, method signatures, and parameter lists. ```jinja2 {% macro _render_item_name(obj, sig=False) -%} `{{ obj.name }} <#{{ obj.id|replace('_', '\\_') }}>`_ {%- if sig -%} \ ({%- for arg in obj.obj.args -%} {%- if arg[0] %}{{ arg[0]|replace('*', '\\*') }}{% endif -%}{{ arg[1] -}} {%- if not loop.last %}, {% endif -%} {%- endfor -%} ){%- endif -%} {%- endmacro %} {% macro _item(obj, sig=False, label='') %} * - {% if label %}:summarylabel-{{ obj.type }}:`{{ label }}` {% endif %}{{ _render_item_name(obj, sig) }} - {% if obj.summary %}{{ obj.summary }}{% else %}\ {% endif +%} {% endmacro %} {% macro _class(cls) %} .. list-table:: :class:`{{ cls.name }}` :header-rows: 0 :widths: 40 60 :class: summarytable {% for obj in cls.children | rejectattr('skip') if not obj.name.startswith('_') and not obj.inherited and not obj.is_abstract -%} {%- set sig = (obj.type in ['method', 'function'] and not 'property' in obj.properties) -%} {%- if obj.type in ['class'] -%} {%- set label = 'class' -%} {%- elif obj.type in ['method', 'function'] -%} {%- set label = 'method' -%} {%- elif obj.type in ['property'] -%} {%- set label = 'property' -%} {%- elif obj.type in ['attribute'] -%} {%- set label = 'attribute' -%} {%- else -%} {%- set label = '' -%} {%- endif -%} {{- _item(obj, sig=sig, label=label) -}} {%- endfor -%} {% endmacro %} {% macro auto_summary(objs) -%} {% for obj in objs -%} {%- if obj.type in ['class'] -%} {{ _class(obj) }} {%- endif -%} {%- endfor -%} {% endmacro %} ``` -------------------------------- ### Create ROGII SOLO Well using Python SDK Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/index.rst Demonstrates how to create a new well within a ROGII SOLO project using the Python SDK. It initializes a SoloClient, sets the active project, and then calls the `create_well` method with various parameters like API, operator, and geographical coordinates. Requires the `rogii_solo` library and valid client credentials. ```python from rogii_solo import SoloClient CLIENT_ID = ... # Input your client ID CLIENT_SECRET = ... # Input your client secret PROJECT_NAME = 'Project1' WELL_NAME = 'Well1' API = '001-123-1236' OPERATOR = 'Schl' CONVERGENCE = 0.1 AZIMUTH = 12 KB = 132 TIE_IN_TVD = 2456 TIE_IN_NS = 145 TIE_IN_EW = 1643 XS_RF_REAL = 643826 YS_RF_REAL = 83461678 def create_well(solo_client: SoloClient): project = solo_client.set_project_by_name(PROJECT_NAME) project.create_well( name=WELL_NAME, api=API, operator=OPERATOR, convergence=CONVERGENCE, azimuth=AZIMUTH, kb=KB, tie_in_tvd=TIE_IN_TVD, tie_in_ns=TIE_IN_NS, tie_in_ew=TIE_IN_EW, xsrf_real=XS_RF_REAL, ysrf_real=YS_RF_REAL, ) def main(): solo_client = SoloClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET) create_well(solo_client) print(project.wells.find_by_name('Well1').to_dict()) if __name__ == '__main__': try: main() except Exception as exception: print(exception) ``` -------------------------------- ### Document Python Methods with Overloads Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/python/method.rst This APIDOC entry describes the structure for documenting Python methods. It covers method signatures, arguments, return annotations, multiple overloads, properties, and detailed docstrings. This format is typically used by documentation generators like Sphinx. ```APIDOC .. py:method:: ()[ -> ] {% for overload in overloads %} ()[ -> ] {% endfor %} {% for property in properties %} :{{ property }}: {% endfor %} Parameters: - : Returns: - : Example: - ``` -------------------------------- ### Solo Cloud Public API and Python SDK Definitions Source: https://github.com/rogii-com/python-sdk/blob/develop/LICENSE.txt Defines key terms related to Rogii's Solo Cloud platform, its public API, and the Python Software Development Kit (SDK). These definitions are crucial for understanding the scope and usage of the provided services and tools. ```APIDOC Software Application: Means software authored by You that accesses or otherwise interoperates with Solo Cloud via the Solo Cloud Public API. Solo Cloud: Means Rogii’s proprietary multi-tenant cloud system and database which contains confidential geoscience and drilling data owned by third parties. Solo Cloud Public API: Means a collection of routines, classes, function parameters, protocols, related libraries, tools and other instructions provided in source code or object code form that allow access to or interoperability with Solo Cloud by a Software Application. Python SDK: Means the software development kit of tools developed by Rogii that enables access to the capabilities and features of Solo Cloud through the utilization of Solo Cloud Public API. ``` -------------------------------- ### Rogii Python SDK and Solo Cloud Public API Warranty Disclaimer Source: https://github.com/rogii-com/python-sdk/blob/develop/LICENSE.txt Details the 'as is' and 'as available' basis for the Solo Cloud Public API, Python SDK, and their documentation. It explicitly disclaims all warranties, including implied warranties of merchantability, fitness for a particular purpose, and non-infringement. ```APIDOC Warranty Disclaimer: THE SOLO CLOUD PUBLIC API, PYTHON SDK AND THEIR DOCUMENTATION AND ALL RELATED COMPONENTS AND INFORMATION ARE PROVIDED BY US ON AN "AS IS" AND "AS AVAILABLE" BASIS WITHOUT ANY WARRANTIES OF ANY KIND, AND WE EXPRESSLY DISCLAIM ANY AND ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. YOU ACKNOWLEDGE THAT ROGII DOES NOT WARRANT THAT THE SOLO CLOUD PUBLIC API OR PYTHON SDK WILL BE UNINTERRUPTED, TIMELY, SECURE, ERROR-FREE, OR BACKWARDS COMPATIBLE. ``` -------------------------------- ### Rogii Python SDK and Solo Cloud Public API Usage License and Restrictions Source: https://github.com/rogii-com/python-sdk/blob/develop/LICENSE.txt Outlines the license granted by Rogii for using the Solo Cloud Public API or Python SDK, along with specific restrictions and prohibited actions to ensure compliance and security. ```APIDOC License Grant: Rogii grants You a world-wide, non-exclusive, revocable limited license, under applicable copyrights, to Use the Solo Cloud Public API or Python SDK, as applicable, only as necessary to develop, test, enable and support interoperability between the Software Application and Solo Cloud. Prohibited Actions: You will not: (A) access Solo Cloud Public API or Python SDK or their documentation in violation of any law or regulation; (B) access Solo Cloud Public API or Python SDK in any manner that (i) compromises, breaks or circumvents any of Rogii’s technical processes or security measures associated with Solo Cloud, (ii) poses a security vulnerability to customers or users of Solo Cloud, or (iii) tests the vulnerability of Rogii’s systems or networks; (C) access Solo Cloud Public API or Python SDK or their documentation in order to replicate or compete with Solo Cloud; (D) attempt to reverse engineer or otherwise derive source code, trade secrets, or know-how of Solos Cloud API, Python SDK or Solo Cloud; or (E) attempt to use Solo Cloud Public API or Python SDK in a manner that exceeds rate limits, or constitutes excessive or abusive usage. ``` -------------------------------- ### Rogii Python SDK and Solo Cloud Public API Liability Limitations Source: https://github.com/rogii-com/python-sdk/blob/develop/LICENSE.txt Specifies the limitations of Rogii's liability concerning the Solo Cloud Public API and Python SDK. It covers damages related to data loss, indirect damages, and matters beyond reasonable control, capping aggregate liability. ```APIDOC Liability Limitations: TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL ROGII BE RESPONSIBLE OR LIABLE WITH RESPECT TO ANY SUBJECT MATTER OF THIS AGREEMENT UNDER ANY CONTRACT, NEGLIGENCE, STRICT LIABILITY OR OTHER THEORY FOR: (I) LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES, OR TECHNOLOGY; OR (II) ANY INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO LOSS OF REVENUES OR PROFITS; (III) ANY MATTER BEYOND ITS REASONABLE CONTROL; OR (IV) ANY AMOUNT IN THE AGGREGATE OVER $100. ``` -------------------------------- ### Rogii Python SDK and Solo Cloud Public API Agreement Termination Source: https://github.com/rogii-com/python-sdk/blob/develop/LICENSE.txt Describes the conditions under which the agreement for using the Solo Cloud Public API and Python SDK can be terminated by Rogii, and the possibility of reinstatement upon remedy of breach. ```APIDOC Agreement Termination: Rogii may terminate this Agreement immediately upon written notice if You breach this Agreement. Rogii may, at its sole discretion, reinstate Your ability to use the Solo Cloud Public API if You demonstrate that You have remedied any such breach. ``` -------------------------------- ### Python SDK API Documentation Template Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/python/class.rst This Jinja2 template defines the structure for generating API documentation for a Python SDK. It uses autoapi directives to render class information, inheritance diagrams, docstrings, and lists of attributes, exceptions, classes, and methods. The template dynamically includes or excludes sections based on object properties and configuration options. ```Jinja2 {% if obj.display %} {% if is_own_page %} {{ obj.id }} {{ "=" * obj.id | length }} {% endif %} {% set visible_children = obj.children|selectattr("display")|list %} {% set own_page_children = visible_children|selectattr("type", "in", own_page_types)|list %} {% if is_own_page and own_page_children %} .. toctree:: :hidden: {% for child in own_page_children %} {{ child.include_path }} {% endfor %} {% endif %} .. py:{{ obj.type }}:: {% if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}{% if obj.args %}({{ obj.args }}){% endif %} {% for (args, return_annotation) in obj.overloads %} {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} {% endfor %} {% if obj.bases %} {% if "show-inheritance" in autoapi_options %} Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %} {% endif %} {% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} .. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }} :parts: 1 {% if "private-members" in autoapi_options %} :private-bases: {% endif %} {% endif %} {% endif %} {% if obj.docstring %} {{ obj.docstring|indent(3) }} {% endif %} {% for obj_item in visible_children %} {% if obj_item.type not in own_page_types %} {{ obj_item.render()|indent(3) }} {% endif %} {% endfor %} {% if is_own_page and own_page_children %} {% set visible_attributes = own_page_children|selectattr("type", "equalto", "attribute")|list %} {% if visible_attributes %} Attributes ---------- .. autoapisummary:: {% for attribute in visible_attributes %} {{ attribute.id }} {% endfor %} {% endif %} {% set visible_exceptions = own_page_children|selectattr("type", "equalto", "exception")|list %} {% if visible_exceptions %} Exceptions ---------- .. autoapisummary:: {% for exception in visible_exceptions %} {{ exception.id }} {% endfor %} {% endif %} {% set visible_classes = own_page_children|selectattr("type", "equalto", "class")|list %} {% if visible_classes %} Classes ------- .. autoapisummary:: {% for klass in visible_classes %} {{ klass.id }} {% endfor %} {% endif %} {% set visible_methods = own_page_children|selectattr("type", "equalto", "method")|list %} {% if visible_methods %} Methods ------- .. autoapisummary:: {% for method in visible_methods %} {{ method.id }} {% endfor %} {% endif %} {% endif %} {% endif %} ``` -------------------------------- ### Python Function Documentation Template Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/python/function.rst This snippet demonstrates a template structure for documenting Python functions. It uses Jinja2 templating to conditionally include function names, arguments, return annotations, overloads, properties, and docstrings, often within a reStructuredText (RST) context for documentation generators like Sphinx. ```jinja2 {% if obj.display %} {% if is_own_page %} {{ obj.id }} {{ "=" * obj.id | length }} {% endif %} .. py:function:: {% if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}({{ obj.args }}){% if obj.return_annotation is not none %} -> {{ obj.return_annotation }}{% endif %} {% for (args, return_annotation) in obj.overloads %} {%+ if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}({{ args }}){% if return_annotation is not none %} -> {{ return_annotation }}{% endif %} {% endfor %} {% for property in obj.properties %} :{{ property }}: {% endfor %} {% if obj.docstring %} {{ obj.docstring|indent(3) }} {% endif %} {% endif %} ``` -------------------------------- ### Python API Documentation Generation Template Source: https://github.com/rogii-com/python-sdk/blob/develop/docs/docs/_templates/autoapi/python/module.rst This Jinja2 template is designed to process Python code introspection data and render it into reStructuredText (RST) for Sphinx. It handles the display of modules, subpackages, submodules, classes, functions, attributes, and exceptions, leveraging autoapi directives for summary generation and nested parsing of docstrings. ```jinja2 {% import 'module_summary.rst' as macros %} {% if obj.display %} {% if is_own_page %} {{ obj.id.replace('_', ' ').capitalize().replace(' ', ' ', 1).title() }} {{ "=" * obj.id|length }} .. py:module:: {{ obj.name }} {% if obj.docstring %} .. autoapi-nested-parse:: {{ obj.docstring|indent(3) }} {% endif %} {% block subpackages %} {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} {% if visible_subpackages %} Subpackages ----------- .. toctree:: :maxdepth: 1 {% for subpackage in visible_subpackages %} {{ subpackage.include_path }} {% endfor %} {% endif %} {% endblock %} {% block submodules %} {% set visible_submodules = obj.submodules|selectattr("display")|list %} {% if visible_submodules %} Submodules ---------- .. toctree:: :maxdepth: 1 {% for submodule in visible_submodules %} {{ submodule.include_path }} {% endfor %} {% endif %} {% endblock %} {% block content %} {% set visible_children = obj.children|selectattr("display")|list %} {% if visible_children %} {% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %} {% if visible_attributes %} {% if "attribute" in own_page_types or "show-module-summary" in autoapi_options %} Attributes ---------- {% if "attribute" in own_page_types %} .. toctree:: :hidden: {% for attribute in visible_attributes %} {{ attribute.include_path }} {% endfor %} {% endif %} .. autoapisummary:: {% for attribute in visible_attributes %} {{ attribute.id }} {% endfor %} {% endif %} {% endif %} {% set visible_exceptions = visible_children|selectattr("type", "equalto", "exception")|list %} {% if visible_exceptions %} {% if "exception" in own_page_types or "show-module-summary" in autoapi_options %} Exceptions ---------- {% if "exception" in own_page_types %} .. toctree:: :hidden: {% for exception in visible_exceptions %} {{ exception.include_path }} {% endfor %} {% endif %} .. autoapisummary:: {% for exception in visible_exceptions %} {{ exception.id }} {% endfor %} {% endif %} {% endif %} {% set all_classes = visible_children|selectattr("type", "equalto", "class")|list %} {{ macros.auto_summary(all_classes) }} {% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} {% if visible_functions %} {% if "function" in own_page_types or "show-module-summary" in autoapi_options %} Functions --------- {% if "function" in own_page_types %} .. toctree:: :hidden: {% for function in visible_functions %} {{ function.include_path }} {% endfor %} {% endif %} .. autoapisummary:: {% for function in visible_functions %} {{ function.id }} {% endfor %} {% endif %} {% endif %} {% set this_page_children = visible_children|rejectattr("type", "in", own_page_types)|list %} {% if this_page_children %} {{ obj.type|title }} Contents {{ "-" * obj.type|length }}--------- {% for obj_item in this_page_children %} {{ obj_item.render()|indent(0) }} {% endfor %} {% endif %} {% endif %} {% endblock %} {% else %} .. py:module:: {{ obj.name }} {% if obj.docstring %} .. autoapi-nested-parse:: {{ obj.docstring|indent(6) }} {% endif %} {% for obj_item in visible_children %} {{ obj_item.render()|indent(3) }} {% endfor %} {% endif %} {% endif %} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.