Summarify
Summarify is a small Python library to extract a title and description from a Web page.
import summarify
summary = summarify.from_url("https://github.com/")
print(summary.title)
print(summary.description)
print(summary.picture)
Output:
The world's leading software development platform · GitHub
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 75 million projects.
https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png
Install
pip3 install summarify
Usage
import summarify
summary = summarify.from_url("https://...")
# If you already have the HTML:
# summary = summarify.from_html("...")
The Summary object returned from summarify.from_url has the following
attributes:
title(strorNone)description(strorNone)url(strorNone): The URL you passed as an argument. If you usedsummary.from_markup, it’ll try to guess it from the markup.picture(strorNone): Picture URLauthor(strorNone)publisher(strorNone)excerpt: AlwaysNonefor now
You can also export a summary as a dict for e.g. JSON serialization:
dict(my_summary) # -> {"url": "...", "title": "..."}
Be aware that only the non-None attributes are included in that dictionnary.
Metadata
Release files for summarify 0.1.0
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 |
|---|---|---|---|---|
| summarify-0.1.0.tar.gz | 4.2 kB | Without provenance | Details for summarify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| summarify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for summarify-0.1.0-py3-none-any.whl |
Total release size: 9.4 kB
Release files / summarify-0.1.0.tar.gz
| Download URL | summarify-0.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba39c82645e732c6a458bbf7acb01761a3035433fe241d70d0755c1d9e72f6f9
|
|
BLAKE2b-256 checksum How to use checksums |
0da2584b69acff69c1aff48d8f922788254820df931158fb7199db7b7e3f9d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.7 Linux/5.15.0-1042-azure
|
Release files / summarify-0.1.0-py3-none-any.whl
| Download URL | summarify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ed3b162bf0a4793b6d30ddfaf4110540e4cdb565063fdb8e85f3f189dbd2274
|
|
BLAKE2b-256 checksum How to use checksums |
86d5b9438bb734cf8be3e4969d8c73489d12068e1d0edb407c936319b150b60a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.7 Linux/5.15.0-1042-azure
|
Security for summarify 0.1.0
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.