Skip to main content

full_alchemyst

Let's you to use both SqlAlchemyst and MongoAlchemyst libraries Les's to use a unique ORM to manage the persistence in one project.

How to Use?

You need to configurate a dictionary with the next parameters: db_config = { "type":"mongo", "host": "localhost", "port":27017, "user":"", "database":"google", "password":"", "SQLALCHEMY_TRACK_MODIFICATIONS":True }

  • *** type: *** mongo | mysql
  • *** host: *** Host where the database is
  • *** port: *** Port of engine runs
  • *** user: *** User
  • *** databse: *** Name of database
  • *** password: *** Password

How you see, you can to specify other attributes of the ORM, like "SQLALCHEMY_TRACK_MODIFICATIONS".

After to set the configuration that you want to use, you have to create a FullAlchemyst instance:

app = Flask(__name__)
fullAlchemyst= FullAlchemyst(app,db_config)

Obviusly, What is a ORM without models? Create one:

class task(fullAlchemyst.Entity):
    id = define(fullAlchemyst.db, {"name":"id","type":"int","primary_key":True})
    nombre = define(fullAlchemyst.db, {"name":"nombre","type":"str"})

Steps:

  1. First, you need to extend you model of fullAlchemyst.Entity
  2. Define your attributes. In this step, remember to use the "define" function. We see this later

"define" function

This function is used to configurate you model depending what type of database you use.

This function, receives a dict, and its structure is the next:

  • type : int | str o another inside de buildins of python.
  • primary_key : If you attribute is a primary key.

Release files for full-alchemyst 1.0.1

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

Source distribution (sdist)

Source distribution for full-alchemyst 1.0.1
File Size Uploaded
full_alchemyst-1.0.1.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for full-alchemyst 1.0.1
File Interpreter ABI Platform
full_alchemyst-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / full_alchemyst-1.0.1.tar.gz

Download URL full_alchemyst-1.0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6aa1efa07a925b71c299f8590708a3308c862a419584ef1c1016ca5693b3db77
BLAKE2b-256 checksum
How to use checksums
4224a97b26a7ef78c05d71f030adbd6d8bf179f9e2489acbd3796f18aee7cea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release files / full_alchemyst-1.0.1-py3-none-any.whl

Download URL full_alchemyst-1.0.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
284e882d6cc59371eb5dcf3c5af860570860baad736855b98aec294870db5108
BLAKE2b-256 checksum
How to use checksums
8dec8b621aabf1ced865e3fd744732cb0cd9d8ef32a838f641a8f5173a3867f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.1

2 release files

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