npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vercel-python-gis-modern

v1.0.6

Published

A modernized Vercel Python runtime with GIS libraries

Readme

vercel-python-gis-modern

A Vercel Python runtime with GEOS, PROJ, and GDAL available for Django GeoDjango applications.

Usage with Django

This runtime can be used with a Django project that uses GeoDjango and PostGIS.

A typical project structure might look like:

project/
├── apps/
│   └── shops/
│       ├── models.py
│       ├── views.py
│       └── ...
├── core/
│   ├── settings.py
│   ├── urls.py
│   ├── wsgi.py
│   └── ...
├── manage.py
└── vercel.json

The names and structure of your Django project can be different. The important part is that vercel.json points to the WSGI entry point of your Django project.

1. Configure vercel.json

Add the custom runtime as a build:

{
    "builds": [
        {
            "src": "core/wsgi.py",
            "use": "[email protected]"
        }
    ],
    "rewrites": [
        {
            "source": "/(.*)",
            "destination": "core/wsgi.py"
        }
    ]
}

Replace core/wsgi.py with the path to your own WSGI entry point if it is located elsewhere.

2. Configure GeoDjango

In config/settings.py, configure the PostGIS database backend:

DATABASES = {
    "default": {
        "ENGINE": "django.contrib.gis.db.backends.postgis",
        # ...
    }
}

The runtime provides the native GIS libraries. Configure Django to load them:

PROJ_LIBRARY_PATH = "libproj.so"
GDAL_LIBRARY_PATH = "libgdal.so"
GEOS_LIBRARY_PATH = "libgeos_c.so.1"

3. Use GeoDjango models

You can use GeoDjango fields normally:

from django.contrib.gis.db import models


class MyModel(models.Model):
    geom = models.PolygonField()

4. Use GeoDjango functionality

GeoDjango's GEOS functionality is also available:

from django.contrib.gis.geos import Point
from django.http import HttpResponse


def my_view(request):
    point = Point(0, 0)

    return HttpResponse(point.wkt)

5. Configure the WSGI entry point

The Vercel Python runtime expects the WSGI application to be exposed as app.

For example, in core/wsgi.py:

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")

app = get_wsgi_application()

If your project uses Django's conventional application variable, you can expose both:

application = get_wsgi_application()
app = application

This allows the same WSGI module to remain compatible with Django's conventional WSGI_APPLICATION setting while also exposing app for Vercel.

Development

The runtime contains native GIS libraries required by GeoDjango:

  • GDAL
  • GEOS
  • PROJ
  • libjpeg
  • libtiff
  • libsqlite
  • libjbig

The binary libraries are packaged with the runtime and made available to the deployed Vercel function.

Building the runtime

Start the build container:

docker-compose run --entrypoint='' builder bash

Then run:

./repo-build.sh

This produces the stripped libraries in:

/temp/stripped-files

Copy them to:

/dist/files

Changing the runtime source

The runtime source in src/ is based on Vercel's Python runtime.

After modifying files under src/, rebuild the package before publishing:

npm run build

License

MIT

This project contains code derived from Vercel's Python runtime and distributes binary libraries under their respective licenses:

  • GDAL — GDAL license
  • GEOS — GEOS license
  • libjbig — JBIG license
  • libjpeg — libjpeg-turbo license
  • PROJ — PROJ license
  • libsqlite — SQLite license
  • libtiff — libtiff license

See the individual projects for their respective license terms.

Author

Maintained by @ShohjahonOktamov.

Based on the original vercel-python-gis runtime by @jperelli.