Skip to main content

Easy to use functions for making changes to sql tables using SqlAlchemy.

Project description

FullmetalAlchemy Logo

FullmetalAlchemy: Easy to use functions for sql table changes

PyPI Latest Release Tests

What is it?

FullmetalAlchemy is a Python package with easy to use functions for inserting, deleting, updating, selecting records in SQL tables.

Where to get it

The source code is currently hosted on GitHub at: https://github.com/eddiethedean/fullmetalalchemy

# PyPI
pip install fullmetalalchemy

Dependencies

Example

import fullmetalalchemy as fa

# Create SqlAlchemy engine to connect to database.
engine = fa.create_engine('sqlite:///foo.db')

# Get a SqlAlchemy table to pass to FullmetalAlchemy functions
table = fa.features.get_table('xy', engine)

# Select records
fa.select.select_records_all(table)
[{'id': 1, 'x': 1, 'y': 2}, {'id': 1, 'x': 2, 'y': 3}]

# Insert records
fa.insert.insert_records(table, [{'id': 3, 'x': 3, 'y': 4}, {'id': 4, 'x': 5, 'y': 6}])

# Delete records
fa.delete.delete_records(table, 'id', [1, 3])

# Update records
fa.update.update_records(table, [{'id': 1, 'x': 11, 'y': 22}, {'id': 1, 'x': 23, 'y': 34}], 'id')

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

fullmetalalchemy-1.2.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

fullmetalalchemy-1.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file fullmetalalchemy-1.2.0.tar.gz.

File metadata

  • Download URL: fullmetalalchemy-1.2.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for fullmetalalchemy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 7d249400b1eb0f2e723a688ea191727b60330148383b821c624dadddf0c02318
MD5 17ef6d81b022b6f08043273f2fd5e510
BLAKE2b-256 5df160ac9feeea23ff4b028a31106ee5dc7fd1630e15c3f13f952c9d5f70aa00

See more details on using hashes here.

File details

Details for the file fullmetalalchemy-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fullmetalalchemy-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 632a217499943891e808c37cb895c67d40fe5cc3573f87de52d3ea92608c4280
MD5 cb5d956539454438706c19339d8ba41a
BLAKE2b-256 72a21be9d59aa931fab0a64857c8402b214aeea28ed733bf5cffc7ad6d15ed66

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