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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kadota-1.1.0.tar.gz | 3.7 kB | Without provenance | Details for kadota-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kadota-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for kadota-1.1.0-py3-none-any.whl |
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
|
Security for kadota 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.