https://github.com/potykion/docci
Various document management utils
https://github.com/potykion/docci
Last synced: 3 months ago
JSON representation
Various document management utils
- Host: GitHub
- URL: https://github.com/potykion/docci
- Owner: potykion
- Created: 2019-05-06T12:45:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:26:03.000Z (over 2 years ago)
- Last Synced: 2025-02-01T08:46:39.771Z (4 months ago)
- Language: Python
- Homepage: https://pypi.org/project/docci/
- Size: 162 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# docci
Various document management utils
## Usage
The `docci.file.FileAttchment` class is root of whole package.
It abstracts work with files and provides useful properties like base64 convertion, content-disposition header generation, mimetype detection:```python
from docci.file import FileAttachment# Create file attachment from file
file = FileAttachment.load("path/to/file")# Now you can use the FileAttachment features:
# Get base64 file representation
file.content_base64# Generate Content-Disposition header with file name
file.content_disposition# Get file extension
file.extension# Get file mimetype
file.mimetype# Save file to disk
file.save("path/to/file")
```To see other features proceed to the [documentation](https://docci.readthedocs.io/en/latest/)