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

Uploaded Python 3

File details

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

File metadata

  • Download URL: enthusiast_source_sanitycms-1.3.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for enthusiast_source_sanitycms-1.3.0.tar.gz
Algorithm Hash digest
SHA256 908a70545ceb229656758d815150efca34759cdf06e18271c908a0b132cc9376
MD5 d61c3d5bbbd34d0af38bdf622d5dabdb
BLAKE2b-256 b4dbe9dfaeae23ca608d9e08b3db5675872de777ae26aa12ddcbd638439bbd50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 025e219ed72f47356c6a343358a828ff2aedb075c72a30a74208d72c66141b12
MD5 9917949fc77cfd169438531d1d05e79d
BLAKE2b-256 93976dd997c1af728673ea5486ae1e69f97ed911ad34aa8cf1d12126944cddc8

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