Skip to main content

SQLAlchemy-MutableSoup defines a mutable BeautifulSoup SQLAlchemy database type.

Installation

$ pip install sqlalchemy-mutablesoup

Quickstart

from sqlalchemy_mutablesoup import MutableSoupType

from sqlalchemy import Column, Integer, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session

# standard session creation
engine = create_engine('sqlite:///:memory:')
session_factory = sessionmaker(bind=engine)
Session = scoped_session(session_factory)
session = Session()
Base = declarative_base()

# define and instantiate a model with a MutableSoupType column.
class Model(Base):
    __tablename__ = 'model'
    id = Column(Integer, primary_key=True)
    soup = Column(MutableSoupType)

Base.metadata.create_all(engine)

model = Model()
session.add(model)

You can now treat model.soup as a bs4.BeautifulSoup object.

Citation

@software{bowen2020sqlalchemy-mutablesoup,
  author = {Dillon Bowen},
  title = {SQLAlchemy-MutableSoup},
  url = {https://dsbowen.github.io/sqlalchemy-mutablesoup/},
  date = {2020-06-04},
}

License

Users must cite this package in any publications which use it.

It is licensed with the MIT License.

Metadata

Release files for sqlalchemy-mutablesoup 0.0.9

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

Source distribution (sdist)

Source distribution for sqlalchemy-mutablesoup 0.0.9
File Size Uploaded
sqlalchemy-mutablesoup-0.0.9.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-mutablesoup 0.0.9
File Interpreter ABI Platform
sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / sqlalchemy-mutablesoup-0.0.9.tar.gz

Download URL sqlalchemy-mutablesoup-0.0.9.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17053e51dcc03df2911a4d2b41b137375d8714f21cf302b316eb1cddd5bb37f1
BLAKE2b-256 checksum
How to use checksums
0f2ff07d3c354efa4130c2ae3c0cdbefa9ecf7bb8f5f5cdf166ea8901f4c6c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

Release files / sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl

Download URL sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3c37b08ad2dcd915eeefa970fa83ca58417a471a55dbb1f54c6e4c1cd595cd0
BLAKE2b-256 checksum
How to use checksums
2e4941b932caf8f34ff7280874ec9687e3cb339c1a33bf741ed4541909a9741c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

1 release file

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

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