Metadata-Version: 2.2
Name: vcdparser
Version: 0.1.0
License: MIT License
        
        Copyright (c) 2025 Kilian Krampf
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/menkalian/vcdparser
Project-URL: Repository, https://github.com/menkalian/vcdparser
Keywords: vcd,parser
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE

# vcdparser

A simple VCD parser to access the contents of a VCD file in python.

The goal is to provide an easy to use, lightweight parser for VCD files.
The parser also aims to be quite fast (for a python library 😉).

## What does it do?

This library contains a simple parser, which reads in VCD files and provides you with the raw data from this file.

## How to use

To install the latest version from PyPI use `pip install vcdparser`.
After that you can import the parser using `import vcdparser.parser`.

This is a simple script showing you how to parse a file and get the first 10 changes of a signal named `"CLK"`:

````python
import vcdparser.parser

vcd = parser.parse_vcd_file("your_file_path.vcd")
clk_id = vcd.get_id("CLK")

count = 0
for t in vcd.timesteps:
    if clk_id in t.variables:
        count += 1
        print(f"CLK changed to {t.variables[clk_id]}")
        if count >= 10:
            break
````

## Contributing

We are always happy to receive contributions!
Please take a look at [the contribution guidelines](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) before making changes.
