-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.rst
133 lines (92 loc) · 3.55 KB
/
index.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
=====
Vesta
=====
Vesta is a `Vestaboard <https://www.vestaboard.com/>`_ client library for
Python. It provides API clients and character encoding utilities.
.. toctree::
:hidden:
changelog
Installation
============
Vesta requires Python 3.8 or later. It can be installed `via PyPI
<https://pypi.org/project/vesta/>`_::
$ python -m pip install vesta
It's only runtime dependency is the `HTTPX`_ library, which will be
installed automatically.
.. _HTTPX: https://www.python-httpx.org/
API Clients
===========
Read / Write API
----------------
:py:class:`vesta.ReadWriteClient` provides a client interface for interacting
with a Vestaboard using the `Read / Write API
<https://docs.vestaboard.com/docs/read-write-api/introduction>`_.
.. important::
A Read / Write API key is required to read or write messages. This key is
obtained by enabling the Vestaboard's Read / Write API via the *Settings*
section of the mobile app or from the `Developer section of the web app
<https://web.vestaboard.com/>`_.
.. autoclass:: vesta.ReadWriteClient
:members:
Subscription API
----------------
:py:class:`vesta.SubscriptionClient` provides a client interface for interacting
with multiple Vestaboards using the `Subscription API
<https://docs.vestaboard.com/docs/subscription-api/introduction>`_.
.. important::
An API secret and key is required to get subscriptions or send messages.
These credentials can be created from the `Developer section of the web
app <https://web.vestaboard.com/>`_.
.. autoclass:: vesta.SubscriptionClient
:members:
Local API
---------
:py:class:`vesta.LocalClient` provides a client interface for interacting with
a Vestaboard over the local network using `Vestaboard's Local API
<https://docs.vestaboard.com/docs/local-api/introduction>`_.
.. important::
Vestaboard owners must first request a `Local API enablement token
<https://www.vestaboard.com/local-api>`_ in order to use the Local API.
.. autoclass:: vesta.LocalClient
:members:
VBML API
--------
:py:class:`vesta.VBMLClient` provides a client interface for Vestaboard's
`VBML (Vestaboard Markup Language) <https://docs.vestaboard.com/docs/vbml>`_
API.
.. autoclass:: vesta.VBMLClient
:members:
Platform API
------------
:py:class:`vesta.Client` provides a client interface for interacting with the
**deprecated** `Vestaboard Platform API <https://docs-v1.vestaboard.com/introduction>`_.
.. warning::
This is the original Vestaboard Platform API. It is **deprecated** and has
been superseded by the other APIs listed above. In particular, Vestaboard
encourages users of the Platform API to switch to the Subscription API,
which offers nearly identical functionality.
.. autoclass:: vesta.Client
:members:
Character Encoding
==================
All Vestaboard characters (letters, numbers, symbols, and colors) are encoded
as integer `character codes <https://docs.vestaboard.com/docs/characterCodes>`_.
Vesta includes some helpful routines for working with these character codes.
.. automodule:: vesta.chars
:members: COLS, ROWS, Row, Rows
.. autoclass:: vesta.Color
:show-inheritance:
:members:
:undoc-members:
:exclude-members: ansi
.. autofunction:: vesta.encode
.. autofunction:: vesta.encode_row
.. autofunction:: vesta.encode_text
.. autofunction:: vesta.pprint
VBML
====
`VBML (Vestaboard Markup Language) <https://docs.vestaboard.com/docs/vbml>`_
defines a language for composing static and dynamic messages.
.. automodule:: vesta.vbml
:members: Component, Position, Props, Style
:member-order: groupwise