semvec/pypi-packages huggingface dataset:
file-editor 1.0.0
A python package to convert a image/pdf file to pdf/image file format
License: MIT

**File-Editor**:

A python package to convert a file to different file format.

*Example* :

png to pdf

pdf to png

jpeg to pdf

pdf to jpeg

tiff to pdf

pdf to tiff

Note : if input is 2 page pdf document and output specified as .png format. it will split the pdf document into two png files.

**Required Packages**:

Python-pil and pdf2image

>>> sudo apt-get install python-pil
>>> pip install pdf2image 

**Usage**:

Following commands will convert the input file to output file format.

*First argument* : Input file path

*Second argument* : Output file format


>>> from file_editor.editor import image
>>> image("example.png",".pdf")

**Supported File Fromats**

*BMP, PDF, EPS, GIF, ICNS, ICO, IM, JPEG, JPEG 2000, MSP, PCX, PNG, PPM, SGI, SPIDER, TIFF, WebP and XBM*
serafin 0.12.2
Python library that implementing selective serialization
License: MIT
Keywords: serafin serialize serialization json config


#######
serafin
#######

**serafin** is a python library that allows to selectively serialize different
kinds of python object into something that can be dumped to JSON or YAML.

.. note::
The project follows the semantic versioning scheme: Until 1.0 the minor

        * The *patch* versions only include bugfixes and changes that do not
          modify the existing interface. You can safely update a patch version
          without worrying it will break your code.
        * The *minor* versions will contain changes to the interface. With a
          single version update your code will most likely work or might require
          small adjustments. The more minor versions you update at once the
          bigger the chance that something will brake.
        * The *major* versions are reserved for significant refactorings and
          architecture changes. This should not happen very often so the major
          version should not change much.

.. note::
    The CircleCI builds can be found
    `here <https://circleci.com/gh/novopl/serafin>`_

.. readme_inclusion_marker

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

.. code-block:: shell

    $ pip install serafin


Contributing
============

Cloning and setting up the development repo
-------------------------------------------

.. code-block:: shell

    $ git clone git@github.com:novopl/serafin.git
    $ cd serafin
    $ virtualenv env
    $ source ./env/bin/activate
    $ pip install .
    $ pip install -r ops/devrequirements.txt
    $ peltak git add-hoooks


Running tests
.............

**Config**: The types of tests are defined in ``pelconf.py`` and the
pytest configuration is defined in ``ops/tools/pytest.ini``.

.. code-block:: shell

    $ peltak test

Linting
.......

**Config**: The list of locations to lint is defined in ``pelconf.py`` and the
linters configuration is defined in ``ops/tools/{pylint,pep8}.ini``.

.. code-block:: shell

    $ peltak lint

Generating docs
...............

**Config**: The list of documented files and general configuration is in
``pelconf.py`` and the Sphinx configuration is defined in ``docs/conf.py``.

.. code-block:: shell

    $ peltak docs
lockorator 0.1
lock decorators
License: MIT

This package provides decorators that will try to acquire lock before
calling decorated function.

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

.. code:: bash

   pip install lockorator

Usage
-----

This package provides two flavours of lock decorators: redis and
asyncio. Both flavours have the same api.

Package ``lockorator.asyncio`` provides asyncio lock decorators, also
compatible with ``trio``.

Package ``lockorator.redis`` provides redis lock decorators.

To use redis locks, set ``LOCKORATOR_REDIS_URL`` in your environment:

::

   export LOCKORATOR_REDIS_URL="redis://localhost:6379"

API
~~~

lock_or_exit
^^^^^^^^^^^^

Decorator. Before decorated function starts, try to acquire lock with
specified identifier. If lock is acquired successfully, proceed
executing the function. Otherwise, return immediately. The ``id``
argument can contain templated string, wich will be rendered with args
and kwargs, passed to the function.

Example:

.. code:: python

   from lockorator.asyncio import lock_or_exit

   @lock_or_exit('lock_work_{}')
   def workwork(x):
       pass

   workwork(3)  # Will try to acquire lock 'lock_work_3'

lock_wait
^^^^^^^^^

Decorator. Before decorated function starts, try to acquire lock with
specified identifier, waiting for ``waittime`` seconds if needed. If
lock is acquired successfully, proceed executing the function.
Otherwise, raise ``lockorator.TimeoutError``. The ``id`` argument can
contain templated string, wich will be rendered with args and kwargs,
passed to the function.

Example:

.. code:: python

   from lockorator.redis import lock_wait

   @lock_wait('lock_work_{}', waittime=4)
   def workwork(x):
       pass

   workwork(3)  # Will try to acquire lock 'lock_work_3' for 4 seconds