semvec/pypi-packages huggingface dataset:
django-clamd 1.0.0
django-clamd is a django integration with Clamd (Clamav daemon).
Keywords: python, django, clamav, antivirus, scanner, virus, libclamav, clamd

django-clamd
=============

This project integrates python-clamd with Django for easy scanning files for viruses on upload


Install
-------

From PyPi with pip:

.. code-block:: bash

    pip install django-clamd

or

.. code-block:: bash

    easy_install django-clamd

You can also install development version direclty from GitHub:

.. code-block:: bash

    pip install git+https://github.com/vstoykov/django-clamd.git


Aditioanlly if you want translations to work you need to add it to installed apps.

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'django_clamd',
        ...
    )
    
    
Additionally if you are using Ubuntu, in order for django-clamd to work install clamav-daemon.

.. code-block:: bash

    sudo apt-get install clamav-daemon


Usage
-----

You can use it in forms:

.. code-block:: python

    from django import forms
    from django_clamd.validators import validate_file_infection

    class UploadForm(forms.Form):
        upload_file = forms.FileField(validators=[validate_file_infection])


Or you can add it as validator directly in your model:

.. code-block:: python

    from django.db import models
    from django_clamd.validators import validate_file_infection

    class FileModel(models.Model):
        document = models.FileField(validators=[validate_file_infection])


You will have automatically scanning of upladed files in Django Admin
and also when create ModelForm's for that model.


Configuration
-------------

By default :code:`django-clamd` tries to be smart and with good defaults.
You can still configure how to connect to Clamd. Default values are:

.. code-block:: python

    CLAMD_SOCKET = '/var/run/clamav/clamd.ctl'
    CLAMD_USE_TCP = False
    CLAMD_TCP_SOCKET = 3310
    CLAMD_TCP_ADDR = '127.0.0.1'

Note: When you are running on Fedora or CentOS and :code:`clamav-scanner`
package is installed then default value for :code:`CLAMD_SOCKET` is:

.. code-block:: python

    CLAMD_SOCKET = '/var/run/clamd.scan/clamd.sock'

By default, this package will *allow* a file if ClamD cannot be contacted or
if the scan fails. If you want validation to fail in these instances, change
:code:`CLAMD_FAIL_BY_DEFAULT`

.. code-block:: python

    CLAMD_FAIL_BY_DEFAULT = True

You also can disable virus scanning for development with:

.. code-block:: python

    CLAMD_ENABLED = False

Note: This is primary for make it easy to run a project on development without
the need of installing Clamd on devlopment machine.


License
-------
`django-clamd` is released as open-source software under the LGPL license.
python-lomography 1.0.2
A Python SDK for fetching images from the lomography.com API.
Requires Python: <4.0,>=3.10

<h1 align="left">python-lomography</h1>

<p align="left">
  <img src="https://cdn.www.lomography.com/assets/api/logo-ac310f0ef22df1894e433d8e6404fac73101518e2a8bc2320a15b91457d8de05.png" />
</p>
<p>
  <a href="https://github.com/scornz/python-lomography/blob/main/LICENSE" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
  </a>
  <a href="https://github.com/scornz" target="_blank">
    <img alt="Github" src="https://img.shields.io/badge/GitHub-@scornz-blue.svg" />
  </a>
  <a href="https://github.com/scornz" target="_blank">
    <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/scornz/python-lomography">
  </a>
</p>

> A Python SDK for fetching images from the lomography.com API.

## Install

> pip install python-lomography

## Example Usage

For most use cases:

```python
lomo = Lomography(api_key="api_key_here")
photos = lomo.fetch_popular_photos(amt=15)
lomo.close()
```

or for asynchronous use cases:

```python
async_lomo = AsyncLomography(api_key="api_key_here")
photos = await async_lomo.fetch_popular_photos(amt=15)
await async_lomo.close()
```

## Documentation

All documentation for _python-lomography_ can be found [here](https://python-lomography.readthedocs.io/en/latest/).

## Development Requirements

- Python ^3.10 ([download](https://www.python.org/downloads/))
- `poetry` (via [your preferred method](https://python-poetry.org/docs/))
- `make`(hopefully already on your device)

## Setup

1.  Ensure requirements are installed correctly.
2.  Navigate to project folder.
3.  From root folder, call `make`. This should set up all git hooks and install the necessary packages via `poetry`.
4.  Call `poetry run pytest` to ensure that everything is set up correctly. All tests should pass.

## License

Copyright © 2024 [Mike Scornavacca](https://github.com/scornz).<br />
This project is [MIT](https://github.com/scornz/python-lomography/blob/main/LICENSE) licensed.
web2img-deltabot 1.1.0
Delta Chat bot to take website screenshots
Requires Python: >=3.8
Keywords: deltachat, bot

# Web to Image - Delta Chat Bot

[![Latest Release](https://img.shields.io/pypi/v/web2img-deltabot.svg)](https://pypi.org/project/web2img-deltabot)
[![CI](https://github.com/deltachat-bot/web2img_deltabot/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/web2img_deltabot/actions/workflows/python-ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A Delta Chat bot that allows saving website URLs as images (taking screenshots of websites)

## Install

```sh
pip install web2img-deltabot
```

Then, to setup [Playwright](https://playwright.dev/python/docs/intro), run:

```sh
playwright install
```

## Usage

To configure the bot:

```sh
web2img-bot init bot@example.org SuperHardPassword
```

**(Optional)** To customize the bot name, avatar and status/signature:

```sh
web2img-bot config selfavatar "/path/to/avatar.png"
web2img-bot config displayname "Web to Image"
web2img-bot config selfstatus "Hi, send me some URL to convert it to image"
```

Finally you can start the bot with:

```sh
web2img-bot serve
```

To see the available options, run in the command line:

```
web2img-bot --help
```
klarenz 190624
Programmatically generate Lilypond scores, with ease and elegance of pure Python
Requires Python: >=3.5


[__Klarenz__](https://en.wikipedia.org/wiki/Clarence_Barlow) (current release: __v190624__) is a highly minimalist Python package (the entire API consists of a single class `Part` and a main processor function `proc`!) for compiling Lilypond sheet music.

For more information and examples please check the [Documentation](https://teymuri.github.io/klarenz-docs/).

# Some Coding Tips
Convert a collection of durations into a progressing beats collection by utilizing `itertools.accumulate`:

```python
from random import choice
from itertools import accumulate

durs = [choice([.25, .5, .75, 1]) for _ in range(4)]
beats = list(accumulate(durs, initial=0))
print("Durations", durs)
print("Beats", beats)

# Durations: [0.25, 0.5, 0.5, 0.75]
# Beats: [0, 0.25, 0.75, 1.25, 2.0]
```

# Contributing

If you wish to contribute your code to this repository, please consider the following points:
- Packaging
  - Ensure to update the `src/klarenz/version.py` file and run `python prebuild.py` (and push the changes!) before initiating the build-upload process for each release with:

    ```
    python -m build && twine upload dist/*
    ```

_This README is generated by `prebuild.py`. Never edit it directly by hand! Instead, modify the `readme` variable in the
pre-build file._