Skip to main content

A plugin for Enthusiast that provides a SanityCMS documents importer.

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-1.2.0.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-1.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enthusiast_source_sanitycms-1.2.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for enthusiast_source_sanitycms-1.2.0.tar.gz
Algorithm Hash digest
SHA256 de0fc5bfe0fa9ef0ea71f9f096a8353b280e056980a8cdb366a206242b63fbe3
MD5 c1a8c6f728016a807dba603c9ebd3fc4
BLAKE2b-256 3a1b1ebe7f7215b7ab2a481f62408ef8c5e8a161981c9290c406fb34ba46ba0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a127482ef90996bf8b10ed5a788ee549bc9db368f39d14d28af6d89fc15724f
MD5 db2bd8b75e46bed4f5e54a3014f5c771
BLAKE2b-256 62dfb205da928e7f6ce16e280ded9c61e9ae86bab2857ddc7fdc0f798fef7de2

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