semvec/pypi-packages huggingface dataset:
django2go 0.1.3
Translate django model to go struct.

# Django Model 2 Go Struct

for gorm or other ORM operation.

Depends in go code:

https://github.com/jinzhu/gorm

https://github.com/guregu/null

## Install

```bash
git clone /django2go.git
cd django2go
python setup.py install .
```

## Usage:

settings.py

```python
INSTALLED_APPS = [
    ...
    'django2go',
    ...
]

```

run CMD:

`python manage.py model2go app_name`

Example generated go code: [testapp.go](./test_project/testapp.go)

`python manage.py model2go app_name --use_column_name` To use database column name.

Django model:

```python

class Model1(models.Model):
    field1 = models.CharField(max_length=200)
    field_with_under_score = models.IntegerField()
    fieldWithUpperCase = models.IntegerField()
    fieldWith_Case = models.IntegerField()

```

Generated go struct:

```go

type Model2 struct {
    Id              int64       `json:"id" gorm:"primary_key"`
    Field1          string      `json:"field1"`
    FieldWithUnderScore int64       `json:"field_with_under_score"`
    Fieldwithuppercase int64       `json:"fieldWithUpperCase"`
    FieldwithCase   int64       `json:"fieldWith_Case"`
}

// TableName 使用指定的数据库表名
func (Model2) TableName() string {
    
    return TABLE_PREFIX + "model2"
    
}

```
estimenergy-client 1.4.1
Client for the Estimenergy API
Requires Python: >=3.6
Keywords: estimenergy api client


[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg)](https://github.com/hacs/integration)
[![Docker](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/docker.yml/badge.svg)](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/docker.yml)
[![PyPI](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/pypi.yml/badge.svg)](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/pypi.yml)
[![HACS](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/hacs.yml/badge.svg)](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/hacs.yml)
[![hassfest](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/hassfest.yml/badge.svg)](https://github.com/EuleMitKeule/EstimEnergy/actions/workflows/hassfest.yml)

# EstimEnergy

EstimEnergy is tool for monitoring and estimating energy usage and cost.
It consists of a FastAPI application that collects data from a home-assistant-glow device, an accompanying API client library and a HACS enabled custom integration for Home Assistant that exposes the data via a sensor entity.

## EstimEnergy API

### Installation

```yaml
# docker-compose

services:
  estimenergy:
    image: ghcr.io/eulemitkeule/estimenergy:latest
    container_name: estimenergy
    restart: unless-stopped
    ports:
      - 12380:80
    volumes:
      - /path/to/appdata/estimenergy:/config
```

The mounted folder must contain a `config.yml` file that is used to integrate and configure home-assistant-glow devices.

### Configuration

```yaml
# config.yml

collectors:
  - name: <name_your_glow_device> # "glow"
    host: <glow_device_ip_address> # 192.168.0.123
    port: <glow_device_ip_address> # 6053
    password: <glow_device_password> # ""
    cost_per_kwh: <cost_per_kilowatt_hour> # 0.1234
    base_cost_per_month: <independent_cost_per_month> # 12.34
    payment_per_month: <monthly_payment_in_advance> # 123.4
    billing_month: <month_the_billing_period_begins> # 9
    max_incomplete_days: <explained_below> # 5
    min_hour: <explained_below> # 0
    max_hour: <explained_below> # 24
```

## EstimEnergy Client Library

### Installation

> pip install estimenergy-client

### Usage

```python
from estimenergy_client import EstimEnergyClient

client = EstimEnergyClient(
    host="<estimenergy_api_ip_address",
    port=<estimenergy_api_port>
)

data = client.get_data(name="<glow_device_name>")
```

## Home Assistant Integration

### Installation

Install the repository in HACS via custom repository option. After restarting Home Assistant you can add and configure the integration via the integrations UI.