semvec/pypi-packages huggingface dataset:
koha-sync 1.2.5
This projects allows to synchronize remote Koha rows to an endpoint
License: MIT
Requires Python: >=2.7

# Koha synchronizer #

Este modulo permite sincronizar registros de Koha al sistema estadistico Lookproxy. 

### Instalacion

Para instalar el modulo `koha-sync` debe seguir estos pasos:

##### **Requerimientos**
* python 3.7+
* El servidor desde el cual ejecuta el modulo, debe tener conexion con el servidor Koha
* La instalacion la puede realizar en un `host dedicado` o en un `host compartido`
  * **host dedicado**: significa que el modulo se ejecuta en un servidor exclusivamente para este proceso. El servidor 
  puede ser de 512 MB o 1 GB de RAM.  
  * **host compartido**: significa  que el modulo de ejecuta en el mismo servidor del Koha.
   
##### **Crear directorio raiz**
```sh
> mkdir /opt/koha-sync
``` 

##### **Instalar y crear sesion de tmux**
```sh
> apt-get install tmux
> tmux new -s koha-sync
```
para salirse de la sesion, debe presionar `ctrl + b + d`


##### Instalar Python3.7

* [Ubuntu](https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/)
* [CentOs 8](https://linuxize.com/post/how-to-install-python-on-centos-8/)
* [CentOs 7](https://tecadmin.net/install-python-3-7-on-centos/)

Al finalizar la instalacion, verifique que corresponda a la `3.7`
```sh
> alias python='python3.7'
> python -V
  |_______3.7
```

##### Instalar pip3

* [Ubuntu](https://itsfoss.com/install-pip-ubuntu/)
* [CentOs 8](https://linuxize.com/post/how-to-install-pip-on-centos-8/)
* [CentOs 7](https://linuxize.com/post/how-to-install-pip-on-centos-7/)

Al finalizar la instalacion, verifique que corresponda a la `20+`
```sh
> pip3 -V
  |______pip 20.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.7)
```

##### Instalar setuptools
```sh
> python3.7 -m pip install setuptools
```

##### Instalar y activar virtaulenv (solo si la instalacion es compartida)
```sh
> python3.7 -m pip install virtualenv
> cd /opt/koha-sync & virtualenv venv
> source /opt/koha-sync/venv/bin/activate
```

##### Instalar el modulo koha-sync
```sh
> python -m pip install koha-sync
```

##### Cargar al servidor el config.yml enviado por Referencistas
```sh
ls
|__ config.yml
```

#### Ejecutar el comando
```yml
koha_syncrhonizer --help

    Options:
     -V, --version           print current cli version and stops execution
     -c, --config-file TEXT  path to configuration file  [required]
     -v, --verbose           activate verbosity output
     -r, --run-once          synchronize once and stops execution
     -t, --test              run validations and stops before synchronize
     --help                  Show this message and exit.

```

**Copyright Â© [Referencistas](https://www.referencistas.com/)**
pyroaman 0.1.1
Roam Research with Python
License: MIT
Requires Python: >=3.6
Keywords: Roam Research

<img src="https://raw.githubusercontent.com/br-g/pyroaman/main/artwork/logo.png" height=100px style="margin-bottom: -14px;">

Pyroaman helps you explore Roam Research databases with Python.


## Installation

You need Python 3.6 or later to use Pyroaman.    
Install and update using pip:

    $ pip install -U pyroaman


## A Simple Example

First, you need the JSON export of a Roam database.    
For this demo, we will use a public one: `roamhacker`.

    $ curl https://raw.githubusercontent.com/br-g/roam-public-db/main/json/roamhacker.json -o roamhacker.json


#### Load

```python
import pyroaman

db = pyroaman.load('roamhacker.json')
print(db)
```

    $ Database (276 pages, 2397 blocks)
    

#### Lookup

Let's query blocks that contain the word "agile":

```python
some_blocks = db.lookup('agile')
print(some_blocks)
```

    $ [Block (string: "Goal for myself: Fight desire to...", is_page: False, children: 1, links: 1, backlinks: 0),
       Block (string: "Agile Note Taking", is_page: True, children: 0, links: 0, backlinks: 1),
       Block (string: "[9]  This example comes from Nas...", is_page: False, children: 0, links: 0, backlinks: 0)]


#### Explore

 Get the text of a block (its string without images, references...):
```python
print(some_blocks[0].text)
```

    $ 'Goal for myself: Fight desire to have the "perfect system". Better to use and iterate improvements, rather than wait for perfect system. And by the way, is there a perfect system? Agile Note Taking?? - sprint, try, iterate'

Get the children of a block:
```python
print(some_blocks[0].children)
```

    $ [Block (string: "Open organization: disorder with...", is_page: False, children: 0, links: 0, backlinks: 0)]

Get its links:
```python
print(some_blocks[0].links)
```

    $ [Block (string: "Agile Note Taking", is_page: True, children: 0, links: 0, backlinks: 1)]

Get backlinks:
```python
print(some_blocks[1].backlinks)
```

    $ [Block (string: "Goal for myself: Fight desire to...", is_page: False, children: 1, links: 1, backlinks: 0)]

Get block's metadata:
```python
print(some_blocks[0].metadata)
```

    $ {'edit-time': 1606399607792,
       'refs': [{'uid': 'YAYZKdubo'}],
       'uid': 'XP9lZauAg',
       ':block/refs': [{':block/uid': 'YAYZKdubo'}],
       ':create/user': {':user/uid': 'kfmqimzFiIOQwL1xgoBOApXxsup1'},
       'create-time': 1599461612984,
       ':edit/user': {':user/uid': 'kfmqimzFiIOQwL1xgoBOApXxsup1'}}
django-crispy-dynamic-relationships 1.0.1
Django crispy forms with dynamic one to many relationships.
License: MIT
Requires Python: >=3.6

django-crispy-dynamic-relationships
===================================

Add dynamic one-to-many relationships to your crispy forms with easy model declaration. It handles saving, updating and deleting automatically.

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

This app can be installed and used in your django project by:

.. code-block:: bash

    $ pip install django-crispy-dynamic-relationships


Edit your `settings.py` file to include `'django-crispy-dynamic-relationships'` in the `INSTALLED_APPS`
listing.

.. code-block:: python

    INSTALLED_APPS = [
        ...
        'django-crispy-dynamic-relationships',
    ]

Subclass ModelFormCrispy to build forms similar to ModelForm. Add an extra field for the one-to-many relationship. Multiple fields supported.

.. code-block:: python

    from django-crispy-dynamic-relationships.factory import ModelFormCrispy

    class Child1Form(ModelFormCrispy):
        class Meta:
            model = models.Child1
            fields ='__all__'

    class ParentForm(ModelFormCrispy):
        class Meta:
            model = models.Parent
            fields ='__all__'

        children = [Child1Form]

Instantiate Forms with the parent class (ParentForm in this example) and a model instance if updating. Then pass the instance to the view context.

.. code-block:: python

    from django_crispy_forms_dynamic.factory import Forms

    context['parent_instance'] = Forms(parent_class=ParentForm, parent_instance=parent_instance)


Load 'dynamic_modelform_tags' in your template and apply the filter to the parent_instance.


.. code-block:: html

    {% load dynamic_modelform_tags %}
    <form method="post">
        {% csrf_token %}
        {{ forms_factory|form_dynamic }}
        <button type="submit" id="id_submit">Submit</button>
    </form>

Finally, save your form by calling is_valid() and save() methods in your POST method of your view.

.. code-block:: python

    def post(self,request,pk=None):
        print(request.POST)
        try:
            parent_instance = Parent.objects.get(pk=pk)
        except Parent.DoesNotExist:
            parent_instance = None
        factory= Forms(parent_class=ParentForm, parent_instance=parent_instance, form_data=request.POST)
        if factory.is_valid():
            factory.save()
            return redirect('success')

Docs & Source
-------------

* Source: https://github.com/angelgm/django-crispy-dynamic-relationships
* PyPI: https://pypi.org/project/django-crispy-dynamic-relationships