semvec/pypi-packages huggingface dataset:
framestructure 0.4.1
Objects for organizing data in frame structures.
License: MIT
Requires Python: >=3.10,<4.0

Frame Structure
===============

|PyPI| |Status| |Python Version| |License|

|Read the Docs| |Tests| |Codecov|

|pre-commit| |Black|

.. |PyPI| image:: https://img.shields.io/pypi/v/framestructure.svg
   :target: https://pypi.org/project/framestructure/
   :alt: PyPI
.. |Status| image:: https://img.shields.io/pypi/status/framestructure.svg
   :target: https://pypi.org/project/framestructure/
   :alt: Status
.. |Python Version| image:: https://img.shields.io/pypi/pyversions/framestructure
   :target: https://pypi.org/project/framestructure
   :alt: Python Version
.. |License| image:: https://img.shields.io/pypi/l/python-framestructure
   :target: https://opensource.org/licenses/MIT
   :alt: License
.. |Read the Docs| image:: https://img.shields.io/readthedocs/python-framestructure/latest.svg?label=Read%20the%20Docs
   :target: https://python-framestructure.readthedocs.io/
   :alt: Read the documentation at https://python-framestructure.readthedocs.io/
.. |Tests| image:: https://github.com/FongAnthonyM/python-framestructure/workflows/Tests/badge.svg
   :target: https://github.com/FongAnthonyM/python-framestructure/actions?workflow=Tests
   :alt: Tests
.. |Codecov| image:: https://codecov.io/gh/FongAnthonyM/python-framestructure/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/FongAnthonyM/python-framestructure
   :alt: Codecov
.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Black


Features
--------

* TODO


Requirements
------------

* TODO


Installation
------------

You can install *Frame Structure* via pip_ from PyPI_:

.. code:: console

   $ pip install python-framestructure


Usage
-----

Please see the `Command-line Reference <Usage_>`_ for details.


Contributing
------------

Contributions are very welcome.
To learn more, see the `Contributor Guide`_.


License
-------

Distributed under the terms of the `MIT license`_,
*Frame Structure* is free and open source software.


Issues
------

If you encounter any problems,
please `file an issue`_ along with a detailed description.


Credits
-------

This project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter`_ template.

.. _@cjolowicz: https://github.com/cjolowicz
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _MIT license: https://opensource.org/licenses/MIT
.. _PyPI: https://pypi.org/
.. _Hypermodern Python Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python
.. _file an issue: https://github.com/FongAnthonyM/python-framestructure/issues
.. _pip: https://pip.pypa.io/
.. github-only
.. _Contributor Guide: CONTRIBUTING.rst
.. _Usage: https://python-framestructure.readthedocs.io/en/latest/usage.html
trace-events 0.1.0
Python event tracing using the Trace Event Format supported by Chromium browsers
License: MIT
Requires Python: >=3.8
Keywords: trace tracing event profile profiler

# Trace Events

Python event tracing using the [Trace Event Format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit)
which is supported by Chromium browsers and other tools

## Installing

Install and update using [pip](https://pypi.org/project/pip/)

## Usage

Add tracing to sections of your code and execute to generate a `json` trace file

```python
import time
from trace_events import Profiler, profile, timeit

@profile
def foo():
    # ... do some work

@profile(category='suspected-slow')
def bar():
    time.sleep(1)

def baz(value):
    with timeit('baz::foo'):
        foo()

    with timeit('baz::bar', value=value):
        bar()

if __name__ == '__main__':
    baz(10)

    Profiler.global_profiler().save_trace('trace.json')
```

Traces are saved `atexit` to a default `trace.json` file, or can be configured with a call to `init_trace`

```python
import trace_events

trace_events.init_trace(
    trace_file_dir='./my-traces',
    trace_file_name='my-trace.json',
    # save_at_exit = True
    # overwrite_trace_files=False,
    # logger=logging.getLogger("trace_events")
)
```

Open up a Chromium browser to [chrome://tracing](chrome://tracing) and load the file to view the trace

![Example image](media/example.png)

More examples in the examples folder

- [Basic Example](examples/basic-example.py)
- [Logging Example](examples/logging-example.py)
- [Tracing Disabled](examples/tracing-disabled.py)