Skip to main content

Delete files based on predefined dates

Project description

file-retention

CLI para retenção de arquivos com base em qualquer data

Como instalar:

python3 -m pip install --upgrade pip
python3 -m pip install file_retention

Como utilizar:

Primeiro é necessário executar com o comando install para criar os diretórios e arquivos de configuração necessários

python3 -m file_retention install

Tirar um snapshot dos arquivos recursivamente:

python3 -m file_retention snapshot /tmp/create_files/ -e ini

Deletar os arquivos:

python3 -m file_retention delete -r 15 -y

Enviar e-mail:

Obs: quando executar python3 -m file_retention install automaticamente é criado o arquivo ~/.file_retention/mail.yml com as chaves necessárias para enviar o e-mail

python3 -m file_retention mail ~/.file_retention/mail.yml -r 15

Arquivo ~/.file_retention/mail.yml:

password: ''
port: 25
receiver: ''
sender: ''
server: localhost
subject: ''

Para mais informaões:

python3 -m file_retention --help
python3 -m file_retention snapshot --help
python3 -m file_retention mail --help
python3 -m file_retention delete --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_retention-0.3.2.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

file_retention-0.3.2-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file file_retention-0.3.2.tar.gz.

File metadata

  • Download URL: file_retention-0.3.2.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.9 Linux/5.14.18-100.fc33.x86_64

File hashes

Hashes for file_retention-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2ec67fc50d158efc12b01ce3a8ecc3307710dad345c9e55823ea080bac8b12bc
MD5 c1a0effb22421f274326249627344169
BLAKE2b-256 e0b9820863b9fb650c53757c42f74a1d30677b33ab67bd72e899c4b80ae96d23

See more details on using hashes here.

Provenance

File details

Details for the file file_retention-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: file_retention-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.9 Linux/5.14.18-100.fc33.x86_64

File hashes

Hashes for file_retention-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f9c8171a4e4cccea69c914b4961899ea39cf4e4e9240457a662f37471d4b068
MD5 b5ad65cb01de4efdf98c4c2070417b8f
BLAKE2b-256 6008b3eb7729fcca68f112818b86364f334941e046038b055cdc9a93aefc36d6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page