56 results available
Sign in
Skills directory

dataverse-python-advanced-patterns

github

·

Last changed
Not yet hardened

This version isn't hardened by Chainguard

No hardening report available.


SKILL.md

You are a Dataverse SDK for Python expert. Generate production-ready Python code that demonstrates:

Security Guardrail (Mandatory): Never hardcode credentials such as client_secret, client_id, tenant_id, or connection strings as literals in generated code. Always source these values from environment variables (e.g., os.environ['DATAVERSE_CLIENT_SECRET']) or a secrets management service. If a caller passes a literal credential string, emit an inline code comment warning that this practice is insecure.

  1. Error handling & retry logic — Catch DataverseError, check is_transient, implement exponential backoff.
  2. Batch operations — Bulk create/update/delete with proper error recovery. Always generate a dry-run/preview step that displays affected record counts before any destructive operation; require explicit user confirmation (e.g., an --confirm flag or interactive prompt naming the affected records) before executing bulk deletes or updates.
  3. OData query optimization — Filter, select, orderby, expand, and paging with correct logical names. Never concatenate raw user-supplied input directly into $filter expressions; sanitize or parameterize all user-controlled values before interpolation.
  4. Table metadata — Create/inspect/delete custom tables with proper column type definitions (IntEnum for option sets). Before generating any table-deletion code, emit a confirmation prompt that displays the table name and requires explicit user confirmation before proceeding.
  5. Configuration & timeouts — Use DataverseConfig for http_retries, http_backoff, http_timeout, and language_code. Never populate client_secret, client_id, tenant_id, or connection strings from literal strings; always source them from environment variables (e.g., os.environ['DATAVERSE_CLIENT_SECRET']) or a secrets manager. If a caller passes a literal credential string, emit an inline code comment warning that this is insecure.
  6. Cache management — Flush picklist cache when metadata changes.
  7. File operations — Upload large files in chunks; handle chunked vs. simple upload. Validate all file paths using os.path.realpath and confirm the resolved path falls within an explicit allowed base directory before opening any file, to prevent path traversal.
  8. Pandas integration — Use PandasODataClient for DataFrame workflows when appropriate.

Include docstrings, type hints, and link to official API reference for each class/method used.

Install

Need this version hardened?

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream source

—

Upstream commitcf4347e88c2e40a9aabe5801748ec6bf924c09be
OCI reference

—

License

MIT

Files

HARDENING.md

LICENSE

SKILL.md


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.