mflag: powerful Python toolkit for mark/unmark files and directories
What is it?
mflag is a Python package that provides marking/unmarking files and directores. For years, dealing with processing files, we understood that we need to put flag for files/directories that are already processed. This package provides the ability to mark files/directories and avoid any unnecessary repeatitive processing of same files/directories. It also can manage serveral processes that willing to write on/in same files/directories. For example, we want to write to a parquet file, the whole processing generate part of the parquet file managed by a separate parallel processes. Using mflag avoid writing errors that happen at same time.
Where to get it
The source code is currently hosted on GitHub at: https://github.com/MosesDastmard/mflag
Binary installers for the latest released version are available at the Python Package Index (PyPI)
# !pip install flagify
from mflag import Flag
import pandas as pd
import os
# lets make a simple csv file
data = {'name':['mflag', 'pandas', 'numpy'],
'toolkit':['marking', 'data analysis', 'data computing']}
pd.DataFrame(data).to_csv('data.csv', index=False)
class Process(Flag):
def __init__(self, process_name):
self.process_name = process_name
Flag.__init__(self, process_name)
def run(self, csv_path, parquet_path):
if not self.isFlagged(csv_path):
pd.read_csv(csv_path).to_parquet(parquet_path)
self.putFlag(csv_path)
else:
print(f"the file {csv_path} is already processed")
Process(process_name='convert_csv_to_parquet').run('data.csv', 'data.parquet')
Process(process_name='convert_csv_to_parquet').run('data.csv', 'data.parquet')
the file data.csv is already processed
Metadata
Release files for mflag 1.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mflag-1.7.3.tar.gz | 5.0 kB | Without provenance | Details for mflag-1.7.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mflag-1.7.3-py3-none-any.whl | Python 3 | none | any | Details for mflag-1.7.3-py3-none-any.whl |
Total release size: 10.6 kB
Release files / mflag-1.7.3.tar.gz
| Download URL | mflag-1.7.3.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f8b80060b0b747ce310269d3bb5bafea089a2da68fbf40dfc4adff5c6514e20
|
|
BLAKE2b-256 checksum How to use checksums |
637b4e26c1f30c79c18e8ae9f22a27911cd7455a5a80da0cdcd3c72bdeea2320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / mflag-1.7.3-py3-none-any.whl
| Download URL | mflag-1.7.3-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edcbbcd7caa038c60af0b551d32242a9e5e661cbc33619cb381713a5ea877a34
|
|
BLAKE2b-256 checksum How to use checksums |
c2ac2b698cffc5d3378bb4ab9ed79dcf56364709c84b05229bc9b975a8b98c4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for mflag 1.7.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.