semvec/pypi-packages huggingface dataset:
pytraeger 0.5
Simple API to interact with the Traeger-Grill API
Requires Python: >=3.7

<!--
SPDX-FileCopyrightText: 2023 Julian Schauder <pytraeger@schauder.info>

SPDX-License-Identifier: MIT
-->
[![REUSE status](https://api.reuse.software/badge/github.com/fsfe/reuse-action)](https://api.reuse.software/info/github.com/fsfe/reuse-action)
# PyTraeger
This Project enables Traeger Grill Monitoring.
For my Use-Case a Grafana Dashboard utilizes a PostgreSQL Database (demo/example02.py).

This lib does 3 things.
1) It initiates authentication with AWS
2) It starts the MQTT-Client (thread 1)
3) It polls for updates (thread 2)


Usage in a Nutshell:
```
-- DEMO 1 --
from pytraeger.manager import Manager as TraegerManager

def call_me(event_grill):
    _LOGGER.info("Message from %s. Grill: %-5s | Probe: %-5s",
                    event_grill.identifier,
                    event_grill.data['status']['grill'],event_grill.data['status']['probe'] )


a = TraegerManager(interval_idle=10, interval_busy=5)
for grill in a.api.grills:
    grill.register_listener(call_me)
```

# Getting Started

Fill the environmentfile.
```
cat .devcontainer/devcontainer.env 
PYTRAEGER_PASSWORD=xxx
PYTRAEGER_USERNAME=xxx

# Optional for DB. Enabled in Dockerfile
PGHOST=xxx
PGUSER=xxx
PGPASSWORD=xxx
```
```
$ docker build . -t traegertest
$ docker run --env-file .devcontainer/devcontainer.env  traegertest
2023-08-04 20:00:31,474 - root - INFO - Debugging of API
2023-08-04 20:00:37,449 - root - INFO - Message from XXXXXXXXX. Grill: 35    | Probe: 37
2023-08-04 20:00:42,569 - root - INFO - Message from XXXXXXXXX. Grill: 35    | Probe: 37
```

# Known Issues:

* EMail-Login is case sensitive
* DB-Usecase doesnt clean up
speedfile 0.0.1
This is the simplest module for quick work with files.
Requires Python: >=3.6
Keywords: files speedfiles

# Speed File Library #

## What is this? ##
The module allows you to work with files in just one line of code, without the need to manually open and close the file each time

## Quick Guide ##
The module is based on the following structure:

    
    f = open('data.txt')
    data = f.readlines()
    f.close()
    
Which Python provides by standard.


----------


### Using ###


Using the library is as simple and convenient as possible:

Let's import it first:
First, import everything from the library (use the `from `...` import *` construct).

Examples of all operations:

Writing the contents of an entire file to a variable using the `read()` function:

    temp = File(path='test.txt').read()


Writing the contents of an entire file to a variable line by line using the `readlines()` function:

    temp = File(path='test.txt').readlines()


Write only the first line from a file using the `readline()` function:

    temp = File(path='test.txt').readline()


Writing data from a variable to a file using write() (overwriting or creating a file):

    temp = "Test data"
    File(path='test.txt', data=temp).write()
    

Adding data from a variable to a file using write() (or creating a file):

    temp = "Test data"
    File(path='test.txt', data=temp).add()


----------


## Developer ##
My site: [link](https://y-a-r-i-k.github.io/)
dataforge 0.0.7
Tools for creating and packaging data products

=========
Dataforge
=========

.. note:: Tested with Python 3.11.

Dataforge is a Python package containing tools for creating and packaging data
products.

.. contents::
   :depth: 2


Installation
============

.. note:: Installation in a virtual environment of the type created by the
          `venv module <https://docs.python.org/3/library/venv.html>`_ or
          `virtualenv <https://virtualenv.pypa.io/en/latest/>`_ is highly
          recommended.

To install dataforge::
    
    pip install dataforge

Optional `Frictionless <https://framework.frictionlessdata.io>`_ plugins can
be enabled by installing with the ``frictionless`` option::

    pip install dataforge[frictionless]

Optional `REDCap`_ support requires
`xmarshal <https://github.com/pschumm/xmarshal>`_, which must be compiled using
`Cython <https://cython.readthedocs.io/>`_. Thus, prior to installation, you
will need a C compiler:

Linux
    ``sudo apt-get install build-essential``

Mac OS X
    Install Apple’s XCode from the App Store

Windows
    Install `Microsoft's C++ Build Tools <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`_ 

Once you have a C compiler, you may install dataforge with REDCap support
using::

    pip install dataforge[redcap]


Configuration
=============

For ease of use, many arguments and options for executable commands as well as
many function arguments may be specified in a file called ``config.yaml``
located at the root of your project. For example, you could specify arguments
and options for the ``redcap_export`` command by creating a ``config.yaml``
file containing something like this::

    sources.redcap.api:
        url: https://redcap.uchicago.edu/api/
        project_name: MyREDCapProject
        outdir: tmp/redcap


REDCap
======

Management of API Tokens
------------------------

To access a REDCap project via the API, you will need to obtain a REDCap API
token. To avoid having to enter the token each time you export data, it is
convenient to add the token to your system keyring. You may do this with the
following command::

    keyring set <redcap_hostname> [<project_name>]

where ``<redcap_hostname>`` is the hostname of your REDCap server (e.g.,
``redcap.uchicago.edu``) and ``<project_name>`` is an abbreviated (no spaces)
name of the REDCap project (e.g., ``MyREDCapProject``). Although specifying a
project name is not required, doing so will allow you to store API tokens for
multiple projects. When you are asked to enter a password, enter the API token
you obtained for your project.

.. warning:: Do not store your API token in a plaintext or otherwise
             unencrypted file, and do not write it down on a piece of paper.
             If another person were to obtain your API token, he or she would
             have the same access to your REDCap project as you do. If there
             is ever a possibility that your token has been compromised, you
             should immediately regenerate your token.
pythy 0.0.1
Clean interface into compiled code
Requires Python: >=3.7

# pythy

A short and sweet Python interface to compiled code


## Overview

`pythy` dynamically generates a Python interface for calling
functions in a shared library using the interface exposed by a
C header file.

`pythy`'s coolest feature is its ability to run compiled code under
the Valgrind debugger. This allows you to test compiled code for
memory errors directly from Python, for example while running
automated testing.


## Installation

`pip install pythy`


## Minimal example

Create `add.c` with the following contents:

```c
#include "add.h"

int add(int a, int b) {
    return a + b;
}
```

and `add.h` with

```c
int add(int a, int b);
```

The compile `add.c` into a Linux shared object with the command
`gcc -fPIC -shared funcs.c -o funcs.so`.

Then run the following Python code, which creates a module `module`
and populates it with a wrapper for the `add` function from your C
code, complete with the correct type information:

```python
import pythy

module = pythy.create_interface("add.h", "add.so")
print(module.add(1, 2))
```

That's it! You've run your compiled C code directly from Python.

`pythy` also has the ability to generate docstrings from your header
file and even automatically create classes.


## Minimal example with Valgrind

TODO: Add a minimal example demonstrating usage with Valgrind.


## Memory spaces

TODO: Move this section to a C implementation guide.

Strings (i.e., all variables with C type `char*`) are passed between Python
and the compiled code by passing the literal bytes in the string (without
the null terminator). All other data types are passed as a numerical value.

To take care of allocated memory, when compiled code returns a `char*`

1. The Python code is not responsible for any direct cleanup, except
   for calling `dlclose` on the SO.

2. The returned pointer is guaranteed to remain valid until another function
   in the same SO is called.

This is most easily implemented by the SO maintaining a global `char*`
variable that tracks the last `char*` returned from a function. Whenever
another `char*` must be allocated and returned, the global is realloced
and returned.

This doesn't scale well to multi-threaded programs, but for now it seems
like the easiest way to do things.
BiomationScripter 1.0.0
Tools for scripting bio-automation protocols

# BiomationScripter

This is a python package containing a set of tool to help with writing automation protocols for various liquid handling robots. There are also a set of generic tools which may help with writing protocols for multiple automation equipment

[ReadTheDocs](https://biomationscripterlib.readthedocs.io) for the current version.

## Getting Started

* https://biomationscripterlib.readthedocs.io/en/latest/Getting-Started

## BiomationScripter - Generic Tools

* https://biomationscripterlib.readthedocs.io/en/latest/BiomationScripter

## EchoProto

* https://biomationscripterlib.readthedocs.io/en/latest/EchoProto
* https://biomationscripterlib.readthedocs.io/en/latest/EchoProto_Templates

## OTProto

* https://biomationscripterlib.readthedocs.io/en/latest/OTProto
* https://biomationscripterlib.readthedocs.io/en/latest/OTProto_Templates