This is a sample script to generate files in WIPO Standard ST.92 Patent Priority Document Data Package (PDDP) ZIP files, for testing REGISTRATION of priority documents in WIPO DAS REST API V2.
It will generate the files for any IP office and IP right type this via the configuration in pddp_config.json.
Disclaimer
This is a sample script to help users prepare their sample files for testing the REST API, it does not cover all possible cases available in ST.92.
If you run into errors or you want an specific case, feel free to modify it to suit your needs.
For official ST.92 resources, please check the following links from the WIPO Standards Division:
Get the generator here: 4.-ST.92.zip (version of 02.10.2026)
To check the generated packages (or packages received from an IP office), use the validator: 4.1.- Validating PDDP packages
Contents of the package
generate_pddp_ib.py # Generator script pddp_config.json # Configuration file (office, year, number patterns) README.md # Documentation
Configuration (pddp_config.json)
{
"office_code": "IB",
"filing_year": 2026,
"patent": { "enabled": true, "number_regex": "PCT/IB{year}/\\d{6}" },
"design": { "enabled": false, "number_regex": "IB{year}\\d{6}" },
"trademark": { "enabled": false, "number_regex": "IB\\d{9}" }
}
| Field | Description |
|---|---|
office_code | WIPO ST.3 office code (e.g. IB, FR, EP, US) |
filing_year | Year used for random filing dates (1 January → today) |
*.enabled | Whether this IP type is generated by default |
*.number_regex | Pattern for generating application numbers (see below) |
Number regex syntax
| Token | Meaning |
|---|---|
\d{N} or [0-9]{N} | N random decimal digits |
{year} | Replaced by filing_year before digit substitution |
| Any other character | Kept as-is (literal) |
Examples for common offices
See also: 1.- Priority number format in use by IP Office
| Office | IP type | number_regex | Example output |
|---|---|---|---|
IB | Patent | PCT/IB{year}/\d{6} | PCT/IB2026/050123 |
FR | Patent | FR\d{7} | FR2420100 |
FR | Design | \d{8} | 01519876 |
FR | Trademark | \d{9} | 018975602 |
EP | Patent | EP\d{8} | EP23123456 |
US | Patent | US\d{7} | US1234567 |
Usage
# Generate all enabled types from config (default: 1 of each)
python3 generate_pddp_ib.py
# Generate only patents, 5 packages
python3 generate_pddp_ib.py --ip-type patent --count 5
# Generate all enabled types into a folder
python3 generate_pddp_ib.py --count 3 --output-dir ./output
# Use a different config (e.g. FR office)
python3 generate_pddp_ib.py --config fr_config.json --ip-type patent
# Fix a specific application number (single package only)
python3 generate_pddp_ib.py --ip-type patent --number "PCT/IB2026/050123"
# Include an ST.26 (XML) sequence listing in patent packages
python3 generate_pddp_ib.py --ip-type patent --count 2 --seq-listing
# Include an ST.25 (plain text) sequence listing - needs filing_year < 2022 in the config
python3 generate_pddp_ib.py --config no_2021.json --ip-type patent \
--seq-listing --seq-listing-format ST25
All options
| Option | Default | Description |
|---|---|---|
--config FILE | pddp_config.json | JSON configuration file |
--ip-type TYPE | all | patent, design, trademark, or all (enabled in config) |
--count N | 1 | Packages to generate per IP type |
--output-dir DIR | . | Output directory |
--number APPNUM | random | Full application number override. Only valid with --count 1 and a single --ip-type; the script stops with an error otherwise. |
--seq-listing | off | Add a sequence listing to patent packages |
--seq-listing-format FMT | ST26 | ST26 (XML) or ST25 (plain text, pre-July-2022 filings only) |
Sequence listings: ST.26 and ST.25
ST.92 paragraph 18 allows a sequence listing in ST.26, ST.25 or ST.23 format “as originally submitted by the applicant”. Footnote 2 ties the choice to the filing date:
All patent applications filed on or after July 1, 2022 disclosing amino acid and nucleotide sequences must contain an ST.26 XML compliant sequence listing. Any sequence listing furnished in respect of any applications filed before that date should still comply with the applicable WIPO Standards.
The generator defaults to ST.26 and produces ST.25 only for earlier filings:
| Format | Option | File | DocumentFileFormatCategory | Allowed filing dates |
|---|---|---|---|---|
| ST.26 | --seq-listing-format ST26 (default) | *_SequenceListing_ST26.xml | XML | any |
| ST.25 | --seq-listing-format ST25 | *_SequenceListing_ST25.txt | TEXT | before 2022-07-01 |
Requesting ST.25 with a filing_year of 2022 or later is refused. For earlier years the generated filing dates are capped at 2022-06-30, so every ST.25 sample is one an Office could really have filed.
Generated ZIP structure
Patent_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│ ├── *_PriorityDocument.pdf
│ ├── *_CertificatePage.pdf
│ └── *_SequenceListing_ST26.xml ← only with --seq-listing
└── SupplementaryArtifacts/
├── *_BibliographicData.xml
├── *_ClassificationData.xml
└── *_Description/
├── *_Description.pdf
└── *_IntermediateDocuments.pdf
Design_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│ ├── *_PriorityDocument.pdf
│ ├── *_CertificationPage.pdf
│ └── *.stl ← 3D representation (ASCII STL)
└── SupplementaryArtifacts/
├── *_RegistrationCertificate.pdf
├── *-001.png ← 2D view 1
├── *-002.png ← 2D view 2
├── *-003.png ← 2D view 3
├── *_BibliographicData.xml
├── *_ClassificationData.xml
└── *_IntermediateDocuments.pdf
Trademark_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│ ├── *_PriorityDocument.pdf
│ ├── *_CertificatePage.pdf
│ └── *.wav ← sound representation (silent WAV)
└── SupplementaryArtifacts/
├── *.png ← mark image
├── *_BibliographicData.xml
├── *_ClassificationData.xml
└── *_IntermediateDocuments.pdf
Supplementary artifacts are real ST.96 V9.0 documents
The bibliographic and classification files are generated per IP right type and validate against the published ST.96 V9.0 schemas:
| IP type | Bibliographic data | Classification |
|---|---|---|
| Patent | pat:BibliographicData | pat:PatentClassificationBag (IPC) |
| Industrial design | dgn:DesignApplication | com:DesignClassificationBag (Locarno) |
| Trademark | tmk:TrademarkApplication | tmk:GoodsServicesBag (Nice) |
Earlier versions emitted com:PatentBibliographicData for every type, including designs and trademarks. That element does not exist in the ST.96 Common namespace, so those files could not be validated against ST.96 at all.
Example output
>>>> python3 generate_pddp_ib.py --ip-type patent --count 2 --seq-listing --output-dir ./output [1] Patent_IB_PCT-IB2026-313920_20260121.zip (patent, PCT/IB2026/313920, filed 2026-01-21, 7,749 bytes +ST26) [2] Patent_IB_PCT-IB2026-577295_20260715.zip (patent, PCT/IB2026/577295, filed 2026-07-15, 7,751 bytes +ST26) Done. 2 package(s) written to './output'.
Requirements
Python 3.10+ — no external dependencies.
Change log
| Date | Changes |
|---|---|
| 08.10.2026 |
|
| 07.10.2026 |
|
| 02.10.2026 |
|
| 29.09.2026 |
|
| 20.03.2026 | Initial version. |

