Function get_gifNimage() opens any image listed below:
jpgjpegpngsvg
Also it opens gif from a link (in string format).
After that, it will be saved in the current folder, convert (if needed) to png (from svg format) and - finally - displayed.
The function deletes the svg file after conversion - in that case, it will leave only the png version so there won't be any useless files in the folder.
Importing and calling:
import get_gifNimage
from get_gifNimage import get_gifNimage
# or, you can write:
# from get_gifNimage import *
# Then you can call the module (for ex.):
get_gifNimage('https://st2.depositphotos.com/1004199/6231/i/600/depositphotos_62310947-stock-photo-boxer-dog-on-white-background.jpg')
get_gifNimage('https://media.giphy.com/media/W80Y9y1XwiL84/giphy.gif')
# or:
import get_gifNimage
# Then you can call the module (for ex.):
get_gifNimage.get_gifNimage('https://st2.depositphotos.com/1004199/6231/i/600/depositphotos_62310947-stock-photo-boxer-dog-on-white-background.jpg')
get_gifNimage.get_gifNimage('https://media.giphy.com/media/W80Y9y1XwiL84/giphy.gif')
get_gifNimage(link, file_name_show=False, dict_appearance=False, show_error_logs=False, only_picture_name=False)
Parametrs: link : string
- Quoted link.
menu
- Show all arguments and their description.
more_info
- show details about arguments function.
file_name_show : bool, default False
- If true, it shows the picture/gif and the file name below the picture output.
dict_appearance : bool, default False
- If true it will build a dictionary related to downloaded pictures/gifs in a separate file (json format). It will store data that will archive every use of our 'get_gifNimage' function. It will be open and checked every time the main function : get_gifNimage - will be called. It's needed when a link doesn't have a unique file name in the page path.
An example of this situation is when we try to use get_gifNimage on this site:
https://media.giphy.com
Every gif here has the same name. Two different gifs below:
https://media.giphy.com/media/q1MeAPDDMb43K/giphy.gif
https://media.giphy.com/media/13CoXDiaCcCoyk/giphy.gif
Every time we call our main fuction 'get_gifNimage' (let's suppose we call it twice,
for those links above),
the names for files in current folder will be:
https://media.giphy.com/media/q1MeAPDDMb43K/giphy.gif -> file_name -> 'giphy.gif'
https://media.giphy.com/media/13CoXDiaCcCoyk/giphy.gif -> file_name -> 'giphy (1).gif'
BUT, our 'file_name' + 'image_type_index_dot' object will see each link as:
https://media.giphy.com/media/q1MeAPDDMb43K/giphy.gif -> 'file_name' + 'image_type_index_dot' = 'giphy.gif'
https://media.giphy.com/media/13CoXDiaCcCoyk/giphy.gif ->'file_name' + 'image_type_index_dot' = 'giphy.gif'
Python record both, but it will rename second as: 'giphy (1).gif; in current folder.
The problem is: our code detects name as 'giphy.gif' in link every time.
We need to fix it, so the relation between 'file_name' object and links will be with logic:
https://media.giphy.com/media/q1MeAPDDMb43K/giphy.gif -> 'file_name' + 'image_type_index_dot' = 'giphy.gif'
https://media.giphy.com/media/13CoXDiaCcCoyk/giphy.gif -> 'file_name' + 'image_type_index_dot' = 'giphy (1).gif'
show_error_logs : bool, default False
- If True it shows all errors passed by exception function.
only_picture_name : bool, default False
- If True, it will download the picture and show the name of the downloaded file without displaying a picture.
markdown_name : bool, default False
- If True, display only a string with a file
file_nameinsidestring. It can be paste then, into markdown in for example Jupyter Notebook. When executed, it will display the picture inside markdown's cell.
Returns: image file and image object displayed
Change Log
==========
0.4.1 (16.06.2021)
- First Relase: stable version
- A new feature added:
menu- show all arguments and their description. - A new feature added:
more_info- show details about arguments function. - A new feature added:
markdown_name=False- whenTrue, display only a string with a filefile_nameinsidestring. You can paste this string into markdown in for example: Jupyter Notebook. When executed, it will display the picture inside markown's cell.
Metadata
Release files for get-gifNimage 0.4.1
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 |
|---|---|---|---|---|
| get_gifNimage-0.4.1.tar.gz | 8.3 kB | Without provenance | Details for get_gifNimage-0.4.1.tar.gz |
Release files / get_gifNimage-0.4.1.tar.gz
| Download URL | get_gifNimage-0.4.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f5612e66ae87f448618ce54a73ffa5e9142ea45dc80c898c0ff796403c4d3f2
|
|
BLAKE2b-256 checksum How to use checksums |
37a5d33888b804c0fbbb02498994cb85a0212b4e1d9ac6f4abe9291b4aebfca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9
|
Security for get-gifNimage 0.4.1
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.