--- title: pymemri keywords: fastai sidebar: home_sidebar summary: "Pymemri is a python client for the memri Personal online datastore (pod). This client can be used to build integrators in python. Integrators connect the information in your Pod. They import your data from external services using Importers (Gmail, WhatsApp, etc.), connect new data to the existing data using indexers (face recognition, spam detection, object detection), and execute actions (sending messages, uploading files)." description: "Pymemri is a python client for the memri Personal online datastore (pod). This client can be used to build integrators in python. Integrators connect the information in your Pod. They import your data from external services using Importers (Gmail, WhatsApp, etc.), connect new data to the existing data using indexers (face recognition, spam detection, object detection), and execute actions (sending messages, uploading files)." nb_path: "nbs/index.ipynb" ---
This repository is built with nbdev, which means that the repo structure has a few differences compared to a standard python repo.
To use the pymemri PodClient
, we first need to have a pod running. The quickest way to do this is to install from the pod repo, and run ./examples/run_development.sh
from within that repo.
from pymemri.data.schema import *
from pymemri.pod.client import *
class Dog(Item):
def __init__(self, name, age, id=None, deleted=None):
super().__init__(id=id, deleted=deleted)
self.name = name
self.age = age
@classmethod
def from_json(cls, json):
id = json.get("id", None)
name = json.get("name", None)
age = json.get("age", None)
return cls(id=id,name=name,age=age)
client = PodClient()
example_dog = Dog("max", 2)
client.add_to_schema(example_dog)
dog = Dog("bob", 3)
client.create(dog)
The Python integrators are written in nbdev (video). With nbdev, it is encouraged to write code in
Jupyter Notebooks. Nbdev syncs all the notebooks in /nbs
with the python code in /pymemri
. Tests are written side by side with the code in the notebooks, and documentation is automatically generated from the code and markdown in the notebooks and exported into the /docs
folder. Check out the nbdev quickstart for an introduction, watch the video linked above, or see the nbdev documentation for a all functionalities and tutorials.