Skip to main content

Mutable BeautifulSoup database type

Project description

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.

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

sqlalchemy-mutablesoup-0.0.9.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy-mutablesoup-0.0.9.tar.gz.

File metadata

  • Download URL: sqlalchemy-mutablesoup-0.0.9.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for sqlalchemy-mutablesoup-0.0.9.tar.gz
Algorithm Hash digest
SHA256 17053e51dcc03df2911a4d2b41b137375d8714f21cf302b316eb1cddd5bb37f1
MD5 9ea684d1d8ef33c22447769840ef8872
BLAKE2b-256 0f2ff07d3c354efa4130c2ae3c0cdbefa9ecf7bb8f5f5cdf166ea8901f4c6c8d

See more details on using hashes here.

File details

Details for the file sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for sqlalchemy_mutablesoup-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b3c37b08ad2dcd915eeefa970fa83ca58417a471a55dbb1f54c6e4c1cd595cd0
MD5 0e1e0cf7f7bce56a7320e8a9405d657a
BLAKE2b-256 2e4941b932caf8f34ff7280874ec9687e3cb339c1a33bf741ed4541909a9741c

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