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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for enthusiast_source_sanitycms-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6329e4cf07f158f7a9d0042dedd290cc8c38d55835bcfd60b3e371b970fd7c4c
MD5 2640bcf32c52d8600cae3bc15d1e5d88
BLAKE2b-256 ef9f19414e4d1b3ce9ebadc8cd610d04704ab8e284660d4451eaeb158a50746c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c48db8de7a171cf0d8867451ecad38da913e86b2c6562a469d998998745f2f9
MD5 7b87dcfb67a35b4f34906855da4817fe
BLAKE2b-256 76ef83cc0bce1ea4ff1462d5528da6ecde9ac2a5091208d132bb0be0b90a6fb7

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