Repository navigation
[0.4.0]
Finally got around to add Tile38s WHERE filter.
Example:
import asyncio
from pyle38 import Tile38
async def main():
tile38 = Tile38(url="redis://localhost:9851", follower_url="redis://localhost:9851")
await tile38.set("fleet", "truck1").fields({"maxspeed":100}).point(52.25,13.37).exec()
await tile38.set("fleet", "truck2").fields({"maxspeed":80}).point(51.25,12.37).exec()
response = await tile38.follower()
.within("fleet")
.where("maxspeed", 100, 100)
.circle(52.25, 13.37, 100000)
.asObjects()
assert response.ok
print(response.dict())
asyncio.run(main())
> {
"ok": True,
"elapsed": "48.8µs",
"fields": ["maxspeed"],
"objects": [
{
"object": {
"type": "Point",
"coordinates": [
13.37,
52.25
]
},
"id": "truck",
"fields": [100],
}
],
"count": 1,
"cursor": 0
}v0.4.0 (2021-09-10)
Feature
- ✨ add where filter to scan command (
8c78d8b) - ✨ add where filter to search command (
5e02bd4) - ✨ add where filter to nearby command (
0f795c8) - ✨ add where filter to intersects command (
dbf8be1) - ✨ add where filter to within command (
ceb5a29)
Fix
- 🐛 update server extended response (
62628fb)