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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for enthusiast_source_sanitycms-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a66f7f9fe44ffc802c0ae55c3a8c6d2106945304df3dd68908da00985514b3c8
MD5 cb53b6afe459998ee1052e42d6b74156
BLAKE2b-256 df51d0ca7593474e6948df85d8248e0efda5adda5f9850968a66d29ea1dc6a2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd8b4f5a18d0e8ab501b1bf9aa3b1b2d17a2399308970d612a891bc357d7482
MD5 88651e194dff55f67d6c85e7fa80f3f8
BLAKE2b-256 2043f46d012816f945c2e60636f257f57209af170cd3d3f39e3d8cae5e80442c

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