Registry / serialization / arcp
library0.2.1pypypi✓ verified 85d ago

arcp is a Python library (current version 0.2.1) designed for creating and parsing arcp (Archive and Package) URIs. These URIs are used to identify or refer to hypermedia files bundled within an archive or application package, such as a ZIP file. The library focuses solely on URI generation and parsing and does not provide functionality for interacting with archive files (like `zipfile`) or making network requests (`urllib.request`). Its release cadence appears slow, with the last update to PyPI in February 2020.

pip install arcp
INSTALL
IMPORT
SIG · ARCP
A
arcp
serializationpythonv0.2.1
Install
1.5s avg
Import
24ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.027s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.022s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

arcp
import arcp
from arcp import parse, serialize
While functional, the library's primary interface is through the top-level 'arcp' module, with functions like 'arcp.parse()' and 'arcp.serialize()'.

This quickstart demonstrates how to create an arcp URI using `arcp.serialize()` and parse an existing arcp URI string into its components using `arcp.parse()`.

import arcp # Example 1: Creating an arcp URI uri_str = arcp.serialize(authority='uuid', name='32a423d6-52ab-47e3-a9cd-54f418a48571', path='/doc.html') print(f"Generated URI: {uri_str}") # Expected: arcp://uuid,32a423d6-52ab-47e3-a9cd-54f418a48571/doc.html # Example 2: Parsing an arcp URI parsed_uri = arcp.parse("arcp://ni,sha-256;F-34D4TUeOfG0selz7REKRDo4XePkewPeQYtjL3vQs0/metadata.json") print(f"Parsed URI scheme: {parsed_uri.scheme}") print(f"Parsed URI authority: {parsed_uri.authority}") print(f"Parsed URI path: {parsed_uri.path}") print(f"Parsed URI name: {parsed_uri.name}") print(f"Parsed URI identifier: {parsed_uri.identifier}")
Debug
Known issues
gotchaThe `arcp` library strictly handles URI parsing and generation. It does NOT provide functionality for accessing, reading, or writing content within actual archive files (e.g., ZIP, JAR) or fetching them via network protocols.
fix
If you need to interact with archive contents, combine `arcp` with other Python libraries like `zipfile`, `tarfile`, or network libraries like `urllib.request` or `requests`.
affects: All versions
deprecatedThe `arcp` library has seen no significant updates or releases since February 2020. While functional for its stated purpose, it may not be actively maintained.
fix
Review the project's GitHub repository (stain/arcp-py) for any new activity before committing to long-term use in critical systems. Consider vendoring if stability is paramount.
affects: <=0.2.1
Errors
Common errors & fixes
AttributeError: module 'arcp' has no attribute 'read_archive'
Attempting to use `arcp` to read the contents of an archive file directly.
fix
The `arcp` library is for URI parsing and generation only. To read an archive, use appropriate Python modules like `zipfile` or `tarfile`. For example: `import zipfile; with zipfile.ZipFile('my_archive.zip', 'r') as zf: ...`
arcp.InvalidURI: Invalid URI authority 'http'
Trying to parse a non-arcp URI (e.g., an HTTP URL) with `arcp.parse()`.
fix
`arcp.parse()` is specifically designed for 'arcp' scheme URIs. Ensure the input string starts with 'arcp://' before parsing. For other URI schemes, use `urllib.parse`.
Upgrade
Version history
0.2.1latest on PyPI · released Feb 12, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
arcp — pip install arcp · libregistry