Skip to content

Commit 49f382f

Browse files
committed
update docs
1 parent 5bad3f5 commit 49f382f

File tree

54 files changed

+8591
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+8591
-11
lines changed

docs/source/api/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
API Reference
2+
=============
3+
4+
This page contains auto-generated API reference documentation [#f1]_.
5+
6+
.. toctree::
7+
:titlesonly:
8+
9+
/api/py_alpaca_api/index
10+
11+
.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
py_alpaca_api.cache.cache_config
2+
================================
3+
4+
.. py:module:: py_alpaca_api.cache.cache_config
5+
6+
.. autoapi-nested-parse::
7+
8+
Cache configuration for py-alpaca-api.
9+
10+
11+
12+
Classes
13+
-------
14+
15+
.. autoapisummary::
16+
17+
py_alpaca_api.cache.cache_config.CacheType
18+
py_alpaca_api.cache.cache_config.CacheConfig
19+
20+
21+
Module Contents
22+
---------------
23+
24+
.. py:class:: CacheType(*args, **kwds)
25+
26+
Bases: :py:obj:`enum.Enum`
27+
28+
29+
Types of cache backends supported.
30+
31+
32+
.. py:attribute:: MEMORY
33+
:value: 'memory'
34+
35+
36+
37+
.. py:attribute:: REDIS
38+
:value: 'redis'
39+
40+
41+
42+
.. py:attribute:: DISABLED
43+
:value: 'disabled'
44+
45+
46+
47+
.. py:class:: CacheConfig
48+
49+
Configuration for cache system.
50+
51+
.. attribute:: cache_type
52+
53+
Type of cache backend to use
54+
55+
.. attribute:: max_size
56+
57+
Maximum number of items in memory cache
58+
59+
.. attribute:: default_ttl
60+
61+
Default time-to-live in seconds
62+
63+
.. attribute:: data_ttls
64+
65+
TTL overrides per data type
66+
67+
.. attribute:: redis_host
68+
69+
Redis host (if using Redis)
70+
71+
.. attribute:: redis_port
72+
73+
Redis port (if using Redis)
74+
75+
.. attribute:: redis_db
76+
77+
Redis database number (if using Redis)
78+
79+
.. attribute:: redis_password
80+
81+
Redis password (if using Redis)
82+
83+
.. attribute:: enabled
84+
85+
Whether caching is enabled
86+
87+
88+
.. py:attribute:: cache_type
89+
:type: CacheType
90+
91+
92+
.. py:attribute:: max_size
93+
:type: int
94+
:value: 1000
95+
96+
97+
98+
.. py:attribute:: default_ttl
99+
:type: int
100+
:value: 300
101+
102+
103+
104+
.. py:attribute:: data_ttls
105+
:type: dict[str, int]
106+
107+
108+
.. py:attribute:: redis_host
109+
:type: str
110+
:value: 'localhost'
111+
112+
113+
114+
.. py:attribute:: redis_port
115+
:type: int
116+
:value: 6379
117+
118+
119+
120+
.. py:attribute:: redis_db
121+
:type: int
122+
:value: 0
123+
124+
125+
126+
.. py:attribute:: redis_password
127+
:type: str | None
128+
:value: None
129+
130+
131+
132+
.. py:attribute:: enabled
133+
:type: bool
134+
:value: True
135+
136+
137+
138+
.. py:method:: get_ttl(data_type: str) -> int
139+
140+
Get TTL for a specific data type.
141+
142+
:param data_type: Type of data to get TTL for
143+
144+
:returns: TTL in seconds

0 commit comments

Comments
 (0)