Skip to main content
Baka model add-ons
==================

`Baka_model <https://github.com/suryakencana/baka_model>`_. is add-ons baka framework built top of pyramid that provides an SQLAlchemy
declarative ``Base`` alias model.Model and a add method on ``request.db``.


Usage
-----

You can use these as base classes for declarative model definitions, e.g.

.. code:: python

from base_model.model import Model

class MyModel(Model):
"""Example model class."""

__tablename__ = 'base.mymodel'

@classmethod
def do_first(cls, session):
instance = session.query(cls).first()


Register Model
--------------

using baka_model, you can apply dependency injection method for model that has been created.

.. code:: python

def includeme(config):
config.register_model('base.MyModel')


# in view handler request
@route('/my.model', renderer='json')
def view_mymodel(request):
MyModel = request.find_model('base.mymodel')
mymodel = MyModel()
mymodel.name = 'user model'
mymodel.address = 'user address'
mymodel.phone = '0089800-998'
request.db.add(mymodel)

return {'success': True}


Install
-------

Install with ``.ini`` file

.. code:: bash
pyramid.includes =
baka_model
pyramid_debugtoolbar
pyramid_mailer


Install with code

.. code:: python

def includeme(config):
config.include('baka_model')

Metadata

Release files for baka_model 0.18.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baka_model 0.18.7
File Size Uploaded Provenance Actions
baka_model-0.18.7.tar.gz 13.6 kB Without provenance Details for baka_model-0.18.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for baka_model 0.18.7
File Interpreter ABI Platform Actions
baka_model-0.18.7-py3-none-any.whl Python 3 none any Details for baka_model-0.18.7-py3-none-any.whl

Total release size: 34.0 kB

Release files / baka_model-0.18.7.tar.gz

Download URL baka_model-0.18.7.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d18708703738c77455c1536fcda4d0636bee12fc318f115fa2552da83e49634b
BLAKE2b-256 checksum
How to use checksums
a301a23ff838a8357ddfb197b929854c5cbf7295391143a70a2719586be8c0a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / baka_model-0.18.7-py3-none-any.whl

Download URL baka_model-0.18.7-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d00410f173349209e782e0e007e33645244c11603327501d65e8e595ea6a89a1
BLAKE2b-256 checksum
How to use checksums
bd3e49e3b7f3f693a3277375b3275d497070e2b2485c6acbbbef3631e831fb86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for baka_model 0.18.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page