Skip to main content

Kadota

Tools for working with Figma programmatically.

Package page can be found here: https://pypi.org/project/kadota/.

Working with this repository

For creating and regenerating environment file:

conda env create --file env.yaml
conda env export --no-builds | grep -v "^prefix: " > env.yaml

For creating requirements file required for pip installability (may need to install pipreqs):

pipreqs . --force

For deleting old builds:

rm build dist -rf

For building before publishing to pypi:

python setup.py sdist bdist_wheel

For testing before publishing to pypi:

twine check dist/*

For publishing to pypi:

twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

Demo

import kadota.utils
import kadota.figmatools

if __name__ == "__main__":
    """
    Function demonstrating usage of kadota.
    """

    # Load keys from keys.json and create a FigmaFile object to access a specific file.
    keys = kadota.utils.load_keys()
    figma_file = kadota.figmatools.FigmaFile(
        keys["figma-access-token"], 
        keys["figma-file-id"]
    )

    # Retrive all the elements.
    print(f"Found {len(figma_file.get_elements())} elements in file.")

    # Retrieve a page id.
    page_name = "templates"
    page_id = figma_file.get_page_ids_by_name(page_name)[0]
    print(f"Found page '{page_name}' with id {page_id}.")

    # Retrieve all the elements with a specific name.
    element_name = "linkedin-square"
    print(f"Found {len(figma_file.get_elements(element_name=element_name))} element(s) with name {element_name}.")

Metadata

Release files for kadota 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kadota 1.1.0
File Size Uploaded
kadota-1.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kadota 1.1.0
File Interpreter ABI Platform
kadota-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / kadota-1.1.0.tar.gz

Download URL kadota-1.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8bdba1733281909929b45b9fdaf768d06b26fbb5f720aaf6059071f648ad230a
BLAKE2b-256 checksum
How to use checksums
c78aba6a949cbc73451f601b6e543e0cf626067e9f8c9768cfa6a725432fcf2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release files / kadota-1.1.0-py3-none-any.whl

Download URL kadota-1.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f12c35bb1545e6a2fe921005862084e7ff63953d10ef772c27d6ffb1f57a6755
BLAKE2b-256 checksum
How to use checksums
df7bd9d3fa99ce6df7601c6d4ef07d9cf0d4afebdef62644007e5d01ef887056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page