Python Access Code

    from kirin import Dataset

    dataset = Dataset(
        root_dir="{{ catalog.root_dir }}",
        name="{{ dataset_name }}"{% if catalog.aws_profile %},
        aws_profile="{{ catalog.aws_profile }}"{% endif %}{% if catalog.gcs_token %},
        gcs_token="{{ catalog.gcs_token }}"{% endif %}{% if catalog.gcs_project %},
        gcs_project="{{ catalog.gcs_project }}"{% endif %}{% if catalog.azure_account_name %},
        azure_account_name="{{ catalog.azure_account_name }}"{% endif %}{% if catalog.azure_account_key %},
        azure_account_key="{{ catalog.azure_account_key }}"{% endif %}{% if catalog.azure_connection_string %},
        azure_connection_string="{{ catalog.azure_connection_string }}"{% endif %}
    )

    {% if checkout_commit %}
    # Checkout to specific commit
    dataset.checkout("{{ checkout_commit }}")
    {% elif current_commit %}
    # Checkout to latest commit (HEAD)
    dataset.checkout("{{ current_commit }}")
    {% else %}
    # Checkout to latest commit (HEAD)
    dataset.checkout()

    # Or checkout to a specific commit
    # dataset.checkout("commit_hash")
    {% endif %}

{% if commits %}
{% for commit in commits %}
{{ commit.short_hash }} {% if loop.first %} HEAD {% endif %} {{ commit.message }}
{% if commit.tags %}
{% for tag in commit.tags %} {{ tag }} {% endfor %}
{% endif %}
{{ commit.timestamp }}
{% if commit.files_added > 0 %} +{{ commit.files_added }} files {% endif %} {% if commit.files_removed > 0 %} -{{ commit.files_removed }} files {% endif %} {% if commit.total_size > 0 %} {{ "%.1f"|format(commit.total_size / (1024*1024)) }} MB {% endif %}
{% if commit.metadata %}

{% endif %}
Browse Files
{% endfor %}
{% else %}

### No commit history

This dataset has no commits yet.

{% endif %}