Skip to main content

This Enthusiast plugin enables the import of document data from Sanity CMS.

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-0.1.1.tar.gz (2.9 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-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enthusiast_source_sanitycms-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.2.0

File hashes

Hashes for enthusiast_source_sanitycms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4f9e5331c1f416dd08347d2409cab7207391879c08720b68900f2bbb1ff68ecd
MD5 b46f0888ba0c74fa220782f55abe956b
BLAKE2b-256 6dc6adc5f47570bc56106010f050cb9ed2f9ea411fb1b65964730e9644a4f3be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enthusiast_source_sanitycms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae26be274dbfe6e498cf5e6b77973827a062a7ad660caadfe5b9168e5a6cad02
MD5 0c2aea1daed1110d526c11acef0005f9
BLAKE2b-256 3c801b624ff99db44a43f7ef450ab6e1c078b9654560c290fbc6643944300ca4

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