Language Libraries
Official libraries for creating, signing, and verifying OPA files in your language of choice.
All libraries follow the OPA specification and support archive creation, digital signing, and signature verification. Each is open-source under the MIT license.
Java
v0.1.0
A zero-dependency Java library for creating, reading, signing, and verifying OPA files. Requires Java 11+.
Install with Maven:
<dependency>
<groupId>ca.weblite</groupId>
<artifactId>opa-core</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
JavaScript
npm
A minimal JavaScript library that works in both the browser and Node.js. Uses the Web Crypto API for secure browser-based signing.
Install with npm:
npm install opa-js
Python
PyPI
A Python library with optional cryptographic signing support. No external dependencies for core functionality.
Install with pip:
pip install opa-archive
For signing support without requiring OpenSSL on your system path:
pip install opa-archive[crypto]
PHP
Composer
A PHP library for generating, reading, signing, and verifying OPA files. Requires PHP 8.1+ with the zip, json, and openssl extensions.
Install with Composer:
composer require opa/opa-php
Ruby
RubyGems
A zero-dependency Ruby library and CLI tool. Relies exclusively on Ruby’s standard library (zlib and openssl).
Install with gem:
gem install opa-ruby
Feature Comparison
| Feature | Java | JavaScript | Python | PHP | Ruby |
|---|---|---|---|---|---|
| Create archives | Yes | Yes | Yes | Yes | Yes |
| Read archives | Yes | Yes | Yes | Yes | Yes |
| Digital signing | Yes | Yes | Yes | Yes | Yes |
| Signature verification | Yes | Yes | Yes | Yes | Yes |
| CLI tool | Yes | – | – | – | Yes |
| Zero dependencies | Yes | – | Yes | – | Yes |
Don’t see your language? The OPA format is built on ZIP and JSON — standard tools in every ecosystem. Check the specification for everything you need to build your own implementation.