Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nthp-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nthp-api

This is a CLI tool for building the Nottingham New Theatre's History Project content database.

  • 0.1.8
  • PyPI
  • Socket score

Maintainers
1

History Project API Generator

This project generates a JSON API from the history-project content repository. It does that in two steps:

  • load: Generate a sqlite database from the source files.
  • dump: Use that database to generate a JSON API.

Endpoints

Usage

From source

  • Ensure you have Poetry installed.
  • Run poetry install.
  • Clone the history project repository into the content/ directory. You can do a shallow clone for this: GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 --branch master git@github.com:newtheatre/history-project content.
  • Run ./nthp load to generate the sqlite database from the content files.
  • Run ./nthp dump to generate the API from the database into the dist/ directory.

From PyPi

  • With pip installed run pip install --user nthp-api. If you have your local bin folder on your path you should now be able to run nthp.
  • Within the history-project repo run nthp load to generate the sqlite database from the content files.
  • Run nthp dump to generate the API from the database into the dist/ directory.

Alternatively you can run nthp build to run both steps in one go.

Contributing

pre-commit hooks

pre-commit hooks are used to lint the source code using Black and ruff

  • Ensure you have pre-commit installed.
  • Run pre-commit install to install pre-commit hooks.

Tests

Run pytest or use the included PyCharm run configuration.

Release

See the bin/release.sh script for the release process. This assumes that your local machine has the correct credentials to publish to PyPi.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc