Skip to main content

Pydbm is a more pythonic way to use dbm.

Project description

Pydbm

Pydbm is a more pythonic way to use dbm.

It provides a fast, simple, and convenient facility for your small-scale Python projects that need a database.

pre-commit test build-docs publish-package-on-pypi

Pypi PyPI - Python Version Downloads License

Forks Issues Stars

Codecov Contributors Last Commit

Installation

Pydbm requires Python 3.8+ and can be easily installed using most common Python packaging tools. We recommend installing the latest stable release from PyPI with pip:

$ pip install pythonic-dbm

Pydbm is a database management system that uses the dbm standard library from Python to provide interfaces to Unix databases in a pythonic way. It is designed for small-scale projects and is a light database, meaning it is not as feature-rich or powerful as other types of databases, such as relational databases.

Pydbm is particularly useful for applications that need to store and retrieve simple data structures quickly, and is well-suited for developers working on small-scale projects that do not require the full functionality of a more complex database management system.

Pydbm is also an object-relational mapper (ORM), which allows developers to work with their database using objects and classes rather than raw commands. This can make it easier to manage and interact with the database in their application in a more pythonic way.

Here is a quick example;

from pydbm import DbmModel

__all__ = (
    "UserModel",
)


class UserModel(DbmModel):
    name: str
    surname: str
    age: int
    username: str

    class Config:
        unique_together = ("username", )

    def get_fullname(self) -> str:
        return f"{self.name} {self.surname}"


user = UserModel(name="Hakan", surname="Celik", age=26, username="hakancelik")
user.save()

hakan_user = UserModel.objects.get(id=user.id)

assert hakan_user.name == "Hakan"
assert hakan_user.surname == "Celik"
assert hakan_user.age == 26
assert hakan_user.username == "hakancelik"

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

pythonic_dbm-0.6.1.tar.gz (63.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonic_dbm-0.6.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file pythonic_dbm-0.6.1.tar.gz.

File metadata

  • Download URL: pythonic_dbm-0.6.1.tar.gz
  • Upload date:
  • Size: 63.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonic_dbm-0.6.1.tar.gz
Algorithm Hash digest
SHA256 4df90bbb985ef5f59e7f9d86b510493f1ea50fbe78bb229b6b84c07453265f5c
MD5 ffd0246acd66d0d765bdacf12a055e46
BLAKE2b-256 0fe1f9cffc459ea1578d9289bbceb70f58e750430fc464ba3d104d5d0e1bdff6

See more details on using hashes here.

File details

Details for the file pythonic_dbm-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: pythonic_dbm-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonic_dbm-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 180bd1ac9d6ad36369b1b518983138ef5c603f820918eee34f444de545b23886
MD5 f8eb43d5a00f1e092fe3be3e45d266e1
BLAKE2b-256 a58c2dd0ee83a858164f505a30a147c0b17308375cb267624e423ba6e21ac8f6

See more details on using hashes here.

Supported by

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