Cache
pokelance.cache.cache
⚓︎
AbilityCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Ability']
A cache for abilities.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
BaseCache(max_size=100)
⚓︎
Bases: MutableMapping[_KT, _VT]
Base class for all caches.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_size |
int
|
The maximum size of the cache. |
100
|
Attributes:
Name | Type | Description |
---|---|---|
_max_size |
int
|
The maximum size of the cache. |
_cache |
Dict[_KT, _VT]
|
The cache itself. |
_endpoints |
Dict[str, int]
|
The endpoints that are cached. |
_endpoints_cached |
bool
|
Whether or not the endpoints are cached. |
_client |
PokeLance
|
The client that this cache is for. |
Examples:
>>> import asyncio
>>> from pokelance import PokeLance
>>>
>>> async def main():
... client = PokeLance()
... print(await client.ping())
... await asyncio.sleep(5) # Wait for all the endpoints to load automatically. If not just load them manually.
... # from pokelance.http import Endpoint
... # data = await client.http.request(Endpoint.get_berry_endpoints())
... # client.berry._cache.load_documents(str(client.berry.__class__.__name__).lower(), "berry", data)
... # print(client.berry.cache.berry.endpoints)
... # await client.berry.cache.berry.load_all(client.http)
... print(client.berry.cache.berry)
... await client.berry.cache.berry.save('temp') # Save the cache to a file.
... await client.berry.cache.berry.load('temp') # Load the cache from a file.
... print(client.berry.cache.berry)
... await client.close()
>>>
>>> asyncio.run(main())
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
BerryCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Berry']
A cache for berries.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
BerryFirmnessCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.BerryFirmness']
A cache for berry firmnesses.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
BerryFlavorCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.BerryFlavor']
A cache for berry flavors.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
CharacteristicCache(max_size=100)
⚓︎
Bases: SecondaryTypeCache['Route', 'models.Characteristic']
A cache for characteristics.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ContestEffectCache(max_size=100)
⚓︎
Bases: SecondaryTypeCache['Route', 'models.ContestEffect']
A cache for contest effects.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ContestTypeCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.ContestType']
A cache for contest types.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EggGroupCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.EggGroup']
A cache for egg groups.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EncounterConditionCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.EncounterCondition']
A cache for encounter conditions.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EncounterConditionValueCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.EncounterConditionValue']
A cache for encounter condition values.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EncounterMethodCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.EncounterMethod']
A cache for encounter methods.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EvolutionChainCache(max_size=100)
⚓︎
Bases: SecondaryTypeCache['Route', 'models.EvolutionChain']
A cache for evolution chains.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
EvolutionTriggerCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.EvolutionTrigger']
A cache for evolution triggers.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GamesGenerationCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Generation']
A cache for games generations.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GamesPokedexCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Pokedex']
A cache for games pokedexes.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GamesVersionCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Version']
A cache for games versions.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GamesVersionGroupCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.VersionGroup']
A cache for games version groups.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GenderCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Gender']
A cache for genders.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
GrowthRateCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.GrowthRate']
A cache for growth rates.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ItemAttributeCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.ItemAttribute']
A cache for item attributes.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ItemCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Item']
A cache for items.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ItemCategoryCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.ItemCategory']
A cache for item categories.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ItemFlingEffectCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.ItemFlingEffect']
A cache for item fling effects.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
ItemPocketCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.ItemPocket']
A cache for item pockets.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
LocationAreaCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.LocationArea']
A cache for location areas.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
LocationCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Location']
A cache for locations.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MachineCache(max_size=100)
⚓︎
Bases: SecondaryTypeCache['Route', 'models.Machine']
A cache for machines.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveAilmentCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveAilment']
A cache for move ailments.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveBattleStyleCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveBattleStyle']
A cache for move battle styles.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Move']
A cache for moves.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveCategoryCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveCategory']
A cache for move categories.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveDamageClassCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveDamageClass']
A cache for move damage classes.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveLearnMethodCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveLearnMethod']
A cache for move learn methods.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
MoveTargetCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.MoveTarget']
A cache for move targets.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
NatureCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Nature']
A cache for natures.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PalParkAreaCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PalParkArea']
A cache for pal park areas.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokeathlonStatCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokeathlonStat']
A cache for pokeathlon stats.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Pokemon']
A cache for pokemon.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonColorCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokemonColor']
A cache for pokemon colors.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonFormCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokemonForm']
A cache for pokemon forms.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonHabitatCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokemonHabitats']
A cache for pokemon habitats.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonLocationAreaCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.LocationAreaEncounter']
A cache for pokemon location areas.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonShapeCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokemonShape']
A cache for pokemon shapes.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
PokemonSpeciesCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.PokemonSpecies']
A cache for pokemon species.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
RegionCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Region']
A cache for regions.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
SecondaryTypeCache(max_size=100)
⚓︎
Bases: BaseCache[_KT, _VT]
A cache for secondary types with differing endpoints.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
StatCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Stat']
A cache for stats.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
SuperContestEffectCache(max_size=100)
⚓︎
Bases: SecondaryTypeCache['Route', 'models.SuperContestEffect']
A cache for super contest effects.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache. Endpoints are different for secondary types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.
TypeCache(max_size=100)
⚓︎
Bases: BaseCache['Route', 'models.Type']
A cache for types.
Source code in pokelance/cache/cache.py
cache: t.Dict[_KT, _VT]
property
⚓︎
endpoints: t.Dict[str, Endpoint]
property
⚓︎
load(path='.')
async
⚓︎
Load the cache from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to load the cache from. |
'.'
|
Source code in pokelance/cache/cache.py
load_all()
async
⚓︎
Load all documents/data from api into the cache. (Endpoints must be cached first)
Source code in pokelance/cache/cache.py
load_all_batch(batch_size=20)
async
⚓︎
Load all documents/data from api into the cache in parallel. (Endpoints must be cached first)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch_size |
int
|
The number of documents to load at once. Default is 20 to avoid overwhelming the API. |
20
|
Source code in pokelance/cache/cache.py
load_documents(data)
⚓︎
Load documents into the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, str]]
|
The data to load. |
required |
Source code in pokelance/cache/cache.py
save(path='.')
async
⚓︎
Save the cache to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to save the cache to. |
'.'
|
Source code in pokelance/cache/cache.py
set_size(size)
⚓︎
Set the size of the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the cache. |
required |
wait_until_ready()
async
⚓︎
Wait until the all the endpoints are cached.