Skip to main content

This Enthusiast plugin enables the import of document data from Sanity CMS.

Project description

Enthusiast Source Sanity CMS

This Enthusiast plugin enables the import of document data from Sanity CMS.

Usage

Assumption: schema type looks like this:

export default {
    name: "blogPost",
    type: "document",
    title: "Blog Post",
    fields: [
      { name: "title", type: "string", title: "Title" },
      { name: "content", type: "array", title: "Content", of: [{ type: "block" }] },
    ],
  };

Fetch all blog posts using below commands:

from source import SanityCMSDocumentSource
s = SanityCMSDocumentSource(1, {'project_id': 'your-project-id-here', 'dataset': 'production', 'schema_type': 'blogPost', 'title_field_name': 'title', 'content_field_name': 'content'})
s.fetch()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enthusiast_source_sanitycms-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enthusiast_source_sanitycms-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file enthusiast_source_sanitycms-0.1.2.tar.gz.

File metadata

  • Download URL: enthusiast_source_sanitycms-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1015-azure

File hashes

Hashes for enthusiast_source_sanitycms-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cb6ce031321e0a87e3f281312c92b4401425fc80aaeaacaca49c0c3a40a53eff
MD5 c5cfa0b4921f794250cad3d68378b9cc
BLAKE2b-256 a25fc673d6ee59079d783d83c23dedb83e9d0981bfd1aaf34face2411e2b31f7

See more details on using hashes here.

File details

Details for the file enthusiast_source_sanitycms-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab177d3fb3c7d2b8662f0edc3dea612c41ff94dd90a3580a06e737f1a724a14
MD5 f37080f1f07df251083ed55f5b24c109
BLAKE2b-256 060d87dfafb3654d44f1cc2343ad5dea88a44a7d1b58ecac39c94dc12712383e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page