Skip to main content

Pydastic is an elasticsearch python ORM based on Pydantic.

Project description

Pydastic

build Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License Coverage Report

Pydastic is an elasticsearch python ORM based on Pydantic.

🚀 Features

Basic feature set still in development.

Definition

class User(ESModel):
    name: str
    phone: Optional[str]
    last_login: datetime = Field(default_factory=datetime.now)

    class Meta:
        index = "user"

CRUD: Save

es = Elasticsearch(hosts="localhost:9200")

user = User(name="John", age=20)
user.save(es, wait_for=True)
assert user.id != None

CRUD: Get

got = User.get(es, id=user.id)
assert got == user

CRUD: Delete

Not yet implemented.

📈 Releases

None yet.

You can see the list of available releases on the GitHub Releases page.

We follow Semantic Versions specification.

We use Release Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.

🛡 License

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

📃 Citation

@misc{pydastic,
  author = {Rami Awar},
  title = {Pydastic is an elasticsearch python ORM based on Pydantic.},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/ramiawar/pydastic}}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydastic-0.2.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

pydastic-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pydastic-0.2.0.tar.gz.

File metadata

  • Download URL: pydastic-0.2.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.10 Darwin/21.1.0

File hashes

Hashes for pydastic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 02fbe80f469330bbf7e9b1b5c20b8fa8813d36bda9b81e21a89c062a2459ce55
MD5 a0eb1b4a592c429b9963620234b6c1c3
BLAKE2b-256 9937d8316ba6ff7d43587321237e7f5a4c09d0c0f3ba42e49538d630137ace51

See more details on using hashes here.

File details

Details for the file pydastic-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pydastic-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.10 Darwin/21.1.0

File hashes

Hashes for pydastic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62c1a1b52ec330152fead370c3129073b2faaeaac486c4fc6207992535d6b719
MD5 c2587b06dd987eef3410bc51a5244002
BLAKE2b-256 2497f482e874bfff7a162ab4d1fd4620ab620ba0bc110671e417a902f94fb5cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page