semvec/pypi-packages huggingface dataset:
gcp-secret-lib 1.0.1
Library for managing Google Cloud Secret Manager secrets.
Requires Python: >=3.10

# gcp-secret-lib

Biblioteca Python para facilitar a leitura, criação, atualização e gerenciamento
de secrets no **Google Cloud Secret Manager**.

Esta biblioteca foi criada para simplificar o uso do Secret Manager em serviços,
pipelines ou aplicações Python, fornecendo uma interface fácil e padronizada
para operações comuns.

---

## 📦 Instalação

Você poderá instalar via:

```bash
pip install gcp-secret-lib
```

Ou instalar diretamente pelo repositório local:

```bash
pip install .
```

---

## 🔐 Autenticação

Para acessar o Secret Manager, é necessário configurar a variável de ambiente
`GOOGLE_APPLICATION_CREDENTIALS` apontando para um arquivo JSON de uma
**Service Account** com permissões adequadas.

Exemplo:

```bash
export GOOGLE_APPLICATION_CREDENTIALS="/caminho/para/sua/service-account.json"
```

A conta precisa das permissões:

- secretmanager.secrets.get
- secretmanager.versions.access
- secretmanager.secrets.create
- secretmanager.versions.add
- secretmanager.secrets.delete (opcional)

---

## 🚀 Como usar

### 1. Importar e inicializar

```python
from gcp_secret_lib import GCPSecretManager

sm = GCPSecretManager()
```

---

### 2. Ler uma secret

```python
secret = sm.get_secret(
    project_id="meu-projeto",
    secret_name="minha-secret"
)

print(secret)
```

Se a secret contiver JSON, ela será automaticamente convertida para dict.

---

### 3. Criar uma nova secret

```python
secret_path = sm.create_secret(
    project_id="meu-projeto",
    secret_name="nova-secret"
)

print("Secret criada em:", secret_path)
```

---

### 4. Atualizar uma secret (criar nova versão)

```python
sm.update_secret(
    project_id="meu-projeto",
    secret_name="nova-secret",
    data={"token": "123", "url": "https://example.com"}
)
```

---

### 5. Carregar secrets como variáveis de ambiente

```python
dados = sm.get_secret("meu-projeto", "minha-secret")
sm.set_env_vars(dados)

import os
print(os.getenv("token"))
```

---

### 6. Deletar uma secret

```python
sm.delete_secret(
    project_id="meu-projeto",
    secret_name="secret-antiga"
)
```

---

## 🔍 Documentação das Funções

### get_secret(project_id, secret_name)
Lê a última versão da secret e retorna o conteúdo como dict.

---

### create_secret(project_id, secret_name)
Cria uma nova secret com replicação automática.

---

### update_secret(project_id, secret_name, data)
Adiciona uma nova versão à secret existente.

---

### set_env_vars(secrets_dict)
Carrega os valores da secret como variáveis de ambiente.

---

### delete_secret(project_id, secret_name)
Remove a secret do projeto.

---

## 📁 Estrutura do Projeto

```
gcp-secret-lib/
│
├── gcp_secret_lib/
│   ├── __init__.py
│   └── secret_manager.py
│
├── tests/
│   └── test_secret_manager.py
│
├── README.md
├── setup.py
└── requirements.txt
```

---

## 🧪 Testes Unitários

Rode:

```bash
pytest
```

Ou:

```bash
PYTHONPATH=. python tests/test_secret_manager.py
```

---

## 🤝 Contribuições

Pull requests e melhorias são bem-vindos!

---
asciiasm 0.2.0
Edit ascii art scenes and control object overlay.

# ascii-scenery-assembler
A tool that helps with putting ascii sprites over each other.

## Guide

### Requirements
1. Python (3.10-ish or more recent recommended)
2. pip for easy installation
3. git for alternative installation

If you're not sure whether you have Python on your machine, type `python --version` in the terminal. If you get something like "no such command", go to https://python.org and get it from there.

### Installation
Type `pip install asciiasm` in the terminal.
With git:
Type `git clone https://github.com/aal337/ascii-scenery-assembler.git` in the terminal, then `cd ascii-scenery-assembler`, then `pip install .` .

### Usage
1. Type `asciiasm` in the terminal.
2. Available commands:
    - `load sprite path/to/sprite.txt`
      where path/to/sprite.txt is the path to your sprite, which will be used as its name.
      Sprites currently have to be perfectly rectangular, including whitespace.
    - `place sprite layer row column`
      where layer is the number of the layer you want to put the sprite into, row the number of the row where the top left corner of the sprite should be, and column the number of the column. Rows/columns start at 0 and are counted from top to bottom/left to right.
      Layers start at 0, the higher the number, the further your sprite is 
    - save canvas path
      where path is the path at which you want to save your canvas.
3. End application:
    - CTRL + C
    - Type `exit tool`

The app will crash if you do something like opening a nonexistent file or placing a nonexisting sprite.
### Features
Currently, you may want to use something else with more QoL and customisation options. Analysing sprites to determine which whitespace fills a shape and which whitespace is outside of a shape to make the latter transparent is the main feature of this tool.
See also: https://summer.hackclub.com/projects/6906

## Disclaimer
I am not absolutely sure if everything works properly. Just take a look at the contents of the tests folder.
Your terminal could behave weirdly after usage.

## Contribution
If you've got feedback, send an email or open an issue.