Glass Command Line & Python Client¶
The Glass command line client can be installed from Pypi. It is used to sync templates and static files between your local environment and the glass web management platform. It also includes a variety of utility functions to aid site developers.
Installation¶
pip install glass-api
glass configure¶
Sets up a .glass directory and configuration files to bootstrap a new site locally.
glass watch¶
Watches local directory for changes and publishes them to the server as you go.
glass get_all and glass put_all¶
Uses rsync like sync.
Python Client¶
This includes a full python client. It’s not currently any better documented than anything else around here, but it’s useful if you’re a python programmer.
Example Use:
from glass import Glass
# username, password, domain
client = Glass('issac@servee.com', 'hunter2', 'www.issackelly.com')
client.list_pages()
client.list_files()
client.get_settings()
client.query_data(bucket='form')
client.query_data(category='nav')
# list current available methods
dir(client)