semvec/pypi-packages huggingface dataset:
fameprotobuf 2.1.0
Protobuf definitions converted to python classes for use in `fameio`
License: Apache-2.0
Requires Python: <4.0,>=3.8
Keywords: protobuffer, FAME, framework, fameio, agent-based modelling

<!-- SPDX-FileCopyrightText: 2025 German Aerospace Center <fame@dlr.de>

SPDX-License-Identifier: Apache-2.0 -->

[![PyPI version](https://badge.fury.io/py/fameprotobuf.svg)](https://badge.fury.io/py/fameprotobuf)
[![PyPI license](https://img.shields.io/pypi/l/fameprotobuf.svg)](https://badge.fury.io/py/fameprotobuf)
[![Pipeline status](https://gitlab.com/fame-framework/fame-protobuf/badges/main/pipeline.svg)](https://gitlab.com/fame-framework/fame-protobuf/commits/main)
[![REUSE status](https://api.reuse.software/badge/gitlab.com/fame-framework/fame-protobuf)](https://api.reuse.software/info/gitlab.com/fame-framework/fame-protobuf)


# FAME-Protobuf
Google Protocol Buffer (protobuf) definitions define the structure of binary input and output files for FAME applications.
Please visit the [Wiki for FAME](https://gitlab.com/fame-framework/wiki/-/wikis/home) to get an explanation of FAME and its components.

FAME-Protobuf connects FAME-Io to applications based on FAME-Core. Thus, both depend on FAME-Protobuf.

## Repository
The repository is split into three source code parts:
* protobuf definitions reside in `src/main/resources`,
* derived Python classes for FAME-Io reside in `src/main/python`.
* derived Java classes for FAME-Core reside in `target/generated-java-sources`

## Installation instructions
Use this Maven dependency:
```
<dependency>
  <groupId>de.dlr.gitlab.fame</groupId>
  <artifactId>protobuf</artifactId>
  <version>2.1.0</version>
</dependency>
```

## Packaging
### Compile
The `pom.xml` is configured to allow automated compilation of the protobuf definitions to Python and Java classes.

### Maven build
In the cloned repository of fame-protobuf, compile and package fame-protobuf locally to your Maven repository: 

```
mvn package
```

### Deploy to PyPI
FAME-Protobuf is packaged to PyPI.
We use [poetry](https://python-poetry.org) for packaging.
Packaging requires these steps:
* install poetry: `pip install poetry`
* run the packaging script: `python packaging.py`
* build wheel: `poetry build` 
* publish: `poetry publish`

# Contribute
Please read the Contributors License Agreement (cla.md), sign it and send it to fame@dlr.de before contributing.
Also, check CONTRIBUTING.md.
sqlalchemy-sync-data 0.0.1
Synchronization of data from different sources into one database using SQLAlchemy as an ORM.
License: Apache-2.0
Requires Python: <4.0,>=3.11

# SQLAlchemy sync data

Synchronization of data from different sources into one database using SQLAlchemy.

## Examples

```python
# models.py
from sqlalchemy.orm import declarative_base
from sqlalchemy import Column, Integer, String

CommonBase = declarative_base()


class User(CommonBase):
    __tablename__ = "old_users"

    id = Column(Integer, autoincrement=True, unique=True, primary_key=True, nullable=False)
    first_name = Column(String(255), nullable=False)
    last_name = Column(String(255), nullable=False)
    username = Column(String(255), nullable=False)


# getters.py

from sqlalchemy_sync_data.getters import SQLiteGetter


class UserGetter(SQLiteGetter):
    template_query = """select id, first_name, last_name, email from users"""
    connection_settings = {"database": "sqlalchemy_sync_data.sqlite"}

# handlers.py

from sqlalchemy_sync_data.handlers import BaseHandler
from .getters import UserGetter
from .models import User

class UserHandler(BaseHandler):
    model = User
    db_fields_to_model_mapping = {
        "id": "id",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "username",
    }
    field_name_as_external_id = 'id'
    getter_class = UserGetter

# synchronizators.py

from sqlalchemy_sync_data.synchronizator import BaseSyncronizator
from .handlers import UserHandler

class UserSyncronizator(BaseSyncronizator):
    handler_classes = (UserHandler,)

# Run sync data
from .synchronizators import UserSyncronizator

syncronizator = UserSyncronizator()
syncronizator.run()
```

## Environment variables

SQLALCHEMY_SYNC_DATA_LOCAL_TIMEZONE - setting time zone (default value "UTC").

## Required

- python >=3.11, <4.0
- fastapi >=0.100.0, <1.0
- SQLAlchemy >=1.4.36, <2.1.0
- requests >=2.32.3
- psycopg2 >=2.9.5
- pytz >=2020.1
- environs >=9.3.1

## Installation
```pip install sqlalchemy-sync-data```

## Contribution

You can run tests with `pytest`.

```
pip install poetry
poetry install
pytest
```