All Projects → kneufeld → Alkali

kneufeld / Alkali

Licence: other
a simple python database

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Alkali

Fluent
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
Stars: ✭ 1,071 (+960.4%)
Mutual labels:  orm, database
Laravel Optimistic Locking
Adds optimistic locking feature to eloquent models.
Stars: ✭ 71 (-29.7%)
Mutual labels:  orm, database
Topaz
A simple and useful db wrapper for Crystal-lang
Stars: ✭ 56 (-44.55%)
Mutual labels:  orm, database
Gorose
GoRose(go orm), a mini database ORM for golang, which inspired by the famous php framwork laravle's eloquent. It will be friendly for php developer and python or ruby developer. Currently provides six major database drivers: mysql,sqlite3,postgres,oracle,mssql, Clickhouse.
Stars: ✭ 947 (+837.62%)
Mutual labels:  orm, database
Evolutility Server Node
Model-driven REST or GraphQL backend for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
Stars: ✭ 84 (-16.83%)
Mutual labels:  orm, database
Hunt Entity
An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.
Stars: ✭ 51 (-49.5%)
Mutual labels:  orm, database
Dbx
A neat codegen-based database wrapper written in Go
Stars: ✭ 68 (-32.67%)
Mutual labels:  orm, database
Walrus
Lightweight Python utilities for working with Redis
Stars: ✭ 846 (+737.62%)
Mutual labels:  orm, database
Orator
The Orator ORM provides a simple yet beautiful ActiveRecord implementation.
Stars: ✭ 1,234 (+1121.78%)
Mutual labels:  orm, database
Ef6
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.
Stars: ✭ 1,218 (+1105.94%)
Mutual labels:  orm, database
Nextjs Sequelize
Next.js With Sequelize Web Application, a Full-Stack Web App Development Boilerplate. https://medium.com/@defrian.yarfi/next-js-with-sequelize-web-application-a-full-stack-web-development-a0051074e998
Stars: ✭ 21 (-79.21%)
Mutual labels:  orm, database
Entityworker.core
EntityWorker is an object-relation mapper(ORM) that enable .NET developers to work with relations data using objects. EntityWorker is an alternative to entityframwork. is more flexible and much faster than entity framework.
Stars: ✭ 91 (-9.9%)
Mutual labels:  orm, database
Express Knex Objection
A simple API system on a pg database, using knex and objection to simplify connection and management
Stars: ✭ 20 (-80.2%)
Mutual labels:  orm, database
Gormt
database to golang struct
Stars: ✭ 1,063 (+952.48%)
Mutual labels:  orm, database
Go Kallax
Kallax is a PostgreSQL typesafe ORM for the Go language.
Stars: ✭ 853 (+744.55%)
Mutual labels:  orm, database
Layr
Dramatically simplify full‑stack development
Stars: ✭ 1,111 (+1000%)
Mutual labels:  orm, database
Goloquent
This repo no longer under maintenance, please go to https://github.com/si3nloong/sqlike
Stars: ✭ 16 (-84.16%)
Mutual labels:  orm, database
Swoft Db
[READ ONLY] Database Compoment for Swoft
Stars: ✭ 25 (-75.25%)
Mutual labels:  orm, database
Ebean
Ebean ORM
Stars: ✭ 1,172 (+1060.4%)
Mutual labels:  orm, database
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+17888.12%)
Mutual labels:  orm, database

Alkali

Alkali was featured on PythonBytes episode #119!

Alkali is a database engine, written in Python 3. It's raison d'être is to provide a Django-like ORM while controlling the on disk format. If you already have your data in a real database like Postgres then you'll want SQLAlchemy, if however, your data is in json/yaml/csv/other/etc files then Alkali might be exactly what you're looking for.

Full documentation at https://alkali.readthedocs.org

For some examples, please go straight to the quickstart guide: https://alkali.readthedocs.io/en/master/quickstart.html

Here's a teaser to whet your appetite.

import os
from alkali import Database, Model, fields, tznow

class Entry(Model):

   date    = fields.DateTimeField(primary_key = True)
   title   = fields.StringField()
   body    = fields.StringField()
   created = fields.DateTimeField(auto_now_add=True)

db = Database(models=[Entry], save_on_exit=True)

e = Entry(date=tznow(), title="my first entry", body="alkali is pretty good")
e.save()    # adds model instance to Entry.objects

title = Entry.objects.filter(date__le=tznow()).first().title
assert title == "my first entry"

db.store()
assert os.path.getsize('Entry.json')

Installation

If you're reading this then you probably didn't install with pip install alkali and get on with your life. You probably want to be able edit the code and run tests and whatnot.

In that case run: pip install -e .[dev]

Documentation

If you want to be able to build the docs then also run

pip install -e .[docs]
make html

Testing

During development pytest was the runner of choice but any unit test runner should work.

Examples:

  • pytest run all tests
  • pytest -s to see stdout (any print statements)
  • pytest --cov to see test coverage
  • pytest -k test_1 to run all tests named test_1
  • pytest -k test_1 alkali/tests/test_fields.py to run test_1 in test_fields.py
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].