semvec/pypi-packages huggingface dataset:
webget 1.0
Python website info api using meta data
License: MIT
Keywords: api,web,webget,scraping,website,website-info,python


# WebGet (Python)

[![image](https://img.shields.io/pypi/v/webget.svg?style=plastic&label=WebGet&color=success)](https://pypi.org/project/webget/)
[![image](https://img.shields.io/pypi/l/webget.svg?style=plastic&color=orange)](https://github.com/nepsho/pyWebget/blob/master/License.txt)
[![image](https://img.shields.io/pypi/pyversions/webget.svg?style=plastic)](https://pypi.org/project/webget/)
[![image](https://img.shields.io/github/contributors/nepsho/pyWebget.svg?style=plastic&color=blueviolet)](https://github.com/nepsho/webget/graphs/contributors)
[![image](https://img.shields.io/pypi/status/webget.svg?style=plastic)](https://pypi.org/project/webget/)


Python website info getter.

## install
```bash
pip install webget
```
**import**
```python
>>> import webget
```
**Get html of website:**
```python
>>> result = webget.getHtml("https://nepsho.github.io/example/meta_tags.html")
```
```js
{
	'success': True,
	'html': 'Html of website'
}
```
**Get images from website:**
```python
>>> result = webget.getImages("https://nepsho.github.io/example/meta_tags.html")
```
```js
{
	'success': True,
	'images': [ArrayOfImagesOnWebsite]
}
```
**Get meta data of website:**
```python
>>> result = webget.getMeta("https://nepsho.github.io/example/meta_tags.html")
```
```js
{
	'success': True, 
	'logo': 'http://nepsho.github.io/lib/img/logo.png', 
	'description': 'Promise and callback based website-info getter using metadata of websites...', 
	'title': 'webget', 
	'keywords': 'NepSho ,Open source, webget, api, nodejs, python, meta, javascript, programming', 
	'subject': 'Open source', 
	'copyright': 'NepSho', 
	'language': 'en', 
	'robots': 'index,follow', 
	'revised': 'Sunday, May 9th, 2019, 0:00 am', 
	'abstract': 'NepSho abstract', 
	'topic': 'Tech', 
	'summary': 'tech is super', 
	'author': 'BCrazyDreamer, bcrazydreamer@gmail.com', 
	'designer': 'bcrazydreamer', 
	'reply-to': 'bcrazydreamer@gmail.com', 
	'url': 'https://nepsho.github.io', 
	'category': 'Web', 
	'site_name': 'webget', 
	'email': 'bcrazydreamer@gmail.com', 
	'country-name': 'INDIA', 
	'phone_numbe': '123-456-7890'
}
```
## licence
MIT [licence](https://github.com/nepsho/pyWebget/blob/master/License.txt)

## Author
@BCrazyDreamer
flask-objectid-converter 2.0.0
Provides url converters for flask to support pymonogs ObjectIDs
License: MIT
Keywords: flask,bson,pymongo,objectid,converter

[![version](https://img.shields.io/pypi/v/flask-objectid-converter.svg)](https://pypi.python.org/pypi/flask-objectid-converter)
[![license](https://img.shields.io/pypi/l/flask-objectid-converter.svg)](https://pypi.python.org/pypi/flask-objectid-converter)
[![pyversions](https://img.shields.io/pypi/pyversions/flask-objectid-converter.svg)](https://pypi.python.org/pypi/flask-objectid-converter)
[![pipeline status](https://travis-ci.org/Fischerfredl/flask-objectid-converter.svg?branch=master)](https://travis-ci.org/Fischerfredl/flask-objectid-converter)
[![coverage](https://img.shields.io/codecov/c/github/fischerfredl/flask-objectid-converter.svg)](https://codecov.io/gh/Fischerfredl/flask-objectid-converter)

# flask-objectid-converter
Provides url converters for flask to support pymonogs ObjectIDs

I found the snippet from [here](http://flask.pocoo.org/snippets/106/) by Armin Ronacher but could not find a package for it.

## Usage
* add the Converter to the flask app
* use it in routes

### Add Converter to app:

The package defines two converters to use: 
* ObjectIDConverter: stringify the id
* Base64ObjectIDConverter: produces smaller strings by encoding to base64

```python
from flask import Flask
from flask_objectid_converter import ObjectIDConverter

app = Flask(__name__)
app.url_map.converters['objectid'] = ObjectIDConverter
```

### Use in routes
```python
@app.route('/users/<objectid:oid>')
def get_user(oid):
    return User.objects.get(id=oid)
``` 

Throws 404 if the requested value cant be decoded

### get route via url_for
```python
from flask import url_for
url_for(get_user, oid=User.id)
```

## Testing
```python
python setup.py test
```

## Possible extensions

Make the package a proper flask extension with **init_app**, **encode**, **decode** functions, **configuration** of conversion algorithm (specify alphabet)...

## Changelog

* 1.0.0: Inital version. Encodes to base64 by default.
* 2.0.0: Provide two converter classes. A simple one and a base64 encoding one. Drop python2 support.