glyph
A proof-of-concept package manager for Cairo contracts/libraries. Distribution through pypi. Installation through existing package managers -- pip, pipenv, poetry.
Intended to be a lightweight layer on top of existing python package management. Sole responsibility is collecting contracts/libraries registered to the contracts namespace package, and copying their contents to a new contracts/lib folder.
Usage
$ glyph --help
Usage: glyph [OPTIONS] COMMAND [ARGS]...
A proof-of-concept package manager for Cairo.
Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
Commands:
clean Remove everything in the lib directory
use Install one or all added cairo packages in the project
Use all libraries installed to the venv:
$ glyph use --all
🔎 Discovering installed contracts...
• Using contracts.placeholder
✅ Done.
TODO: add real example from pypi
Library Setup
In order to allow your contracts to be installed, a few conventions must be followed.
contracts # The "namespace package" that the contracts are installed to
└── placeholder # The library you are distributing
├── contract.cairo
└── __init__.py # Required to be installable.
setup.py # The installer
The actual setup.py will look something like this:
from setuptools import setup
setup(
name="placeholder",
version="1",
description="",
long_description="",
author="Jane Doe",
author_email="author@example.com",
license="MIT License",
packages=["contracts.placeholder"],
# Include all extra package data. Possible to include *.cairo only
package_data={"": ["*"]},
zip_safe=False,
)
Once distributed on pypi, one could:
(venv) $ pip install cairo-glyph cairo-placeholder
...
(venv) $ glyph use placeholder
🔎 Discovering installed contracts...
• Using contracts.placeholder
✅ Done.
Adding the following to your project:
contracts/
└── libs
└── placeholder
└── contract.cairo
Metadata
Release files for cairo-glyph 0.0.1
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 |
|---|---|---|---|---|
| cairo-glyph-0.0.1.tar.gz | 3.7 kB | Without provenance | Details for cairo-glyph-0.0.1.tar.gz |
Release files / cairo-glyph-0.0.1.tar.gz
| Download URL | cairo-glyph-0.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a27d5e91bddf41daaed90bf6ca95728c6c173a96dca61e9308ef54189072f4e1
|
|
BLAKE2b-256 checksum How to use checksums |
5b73b78e4e69343c39fb2f58a16bae04a8b45a27a3f75e26b9b6a38cf04a2414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.9.9 Linux/4.15.0-167-generic
|
Security for cairo-glyph 0.0.1
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.