Skip to main content

4 posts tagged with "sqlite"

sqlite tag description

View All Tags

Building a URL Redirector in Python for Dynamic QR Codes

· 4 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

If you print 1,000 posters with a QR code and the website URL changes next week, a "Static" QR code becomes a pile of wasted paper. The solution is a Dynamic QR code.

Instead of encoding your final destination (like myshop.com/promo-january), you encode a "Short URL" that you control (like myqr.link/offer). When a user scans it, your server looks up where offer should go today and redirects them instantly.

Python Barcode Processing: Export Data, Generate 2D Codes, and Database Integration

· 6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation
  • tooling image: /img/blog/thumbnails/exporting-python-barcode-scan-data-csv-excel.png

Exporting your scan data is the final piece of the puzzle. While a database is great for storage, most team members prefer to see results in a spreadsheet.

In Python, the pandas library is the gold standard for this. It can read directly from your SQLite database and convert that data into a professional-looking Excel or CSV file in just a few lines of code.

Casbin Policy Storage in Python: SQLite, Firestore, and SQLAlchemy Adapter Guide

· 7 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Using SQLite as the database adapter for Casbin policy storage is the ideal solution for local development, unit testing, and small-scale applications due to its lightweight, file-based nature.

In the Python Casbin ecosystem, this is achieved using the casbin-sqlalchemy-adapter, as SQLAlchemy natively supports SQLite without needing separate driver installations [2].

Use this Instead of SQlite on Vercel

· 5 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Is SQLite Supported on Vercel?​

No, SQLite is not officially supported by Vercel for production applications because of its reliance on the local filesystem. Vercel's serverless functions are stateless and run in a read-only environment, meaning any changes to the local filesystem are discarded after the function's execution. This makes it impossible to persist the SQLite database file between function invocations. Vercel source

While you might be able to get a read-only SQLite database to work by including the database file in your deployment bundle, any attempt to write to it will fail. This limitation makes SQLite unsuitable for most dynamic web applications on the Vercel platform.