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

Uploaded Python 3

File details

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

File metadata

  • Download URL: enthusiast_source_sanitycms-1.4.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1015-azure

File hashes

Hashes for enthusiast_source_sanitycms-1.4.0.tar.gz
Algorithm Hash digest
SHA256 83ae274d86ce7357ae57203d82911628be40e7306095f10a3d6cd1ef380cbad5
MD5 f6fcc35dbe657698a408b27e182e36ec
BLAKE2b-256 e45b653d546480eb2caa8174ee4d546cd0c554b0ed77c11c18004b92e6f9a4aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e84de4f9f07dcce90c745d8ff1e6cd4857b70a03351d0965578603e4402b1f7b
MD5 30f01bef1a88220fc37ffbf1e3dc74c4
BLAKE2b-256 9c652ba0c41b123042d916f881ffa24955da079b7923240078fddf47c0948a03

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