Metadata-Version: 2.1
Name: freemt-utils
Version: 0.0.9
Summary: baidu translate for free with async and proxy support
Home-page: http://github.com/ffreemt/freemt-utils
Author: mikeee
License: MIT License
Download-URL: https://github.com/ffreemt/freemt-utils/archive/v_009.tar.gz
Description: # freemt-utils ![Python3.6|3.7 package](https://github.com/ffreemt/freemt-utils/workflows/Python3.6%7C3.7%20package/badge.svg)![Codecov](https://github.com/ffreemt/freemt-utils/workflows/Codecov/badge.svg)[![PyPI version](https://badge.fury.io/py/freemt-utils.svg)](https://badge.fury.io/py/freemt-utils)
        
        various utils for freemt
        
        ### Update v.0.0.7
        
        `langcode_to_tmxcode`: need (`marisa-trie`) and `langcodes`.
        
        If you don't have VC in the system, you'll need to install a whl version of `marisa-trie` that can be downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#marisa-trie
        
        ### Installation
        
        ```pip install freemt-utils```
        
        Validate installation
        ```
        python -c "import freemt_utils; print(freemt_utils.__version__)"
        0.0.1
        ```
        
        ### Usage
        
        ```
        from pathlib import Path
        import asyncio
        from freemt_utils import save_tempfile, switch_to, httpx_get, make_url, arun, fetch_proxies, logger_level
        
        with switch_to():
          print(Path.cwd())  # home dir
        print(Path.cwd())  # back to the current work directory
        
        try:
          arun(httpx_get('www.baidu.com'))
        except Exception as exc:
          print(exc)  # InvalidURL: No scheme included in URL.
        
        res = arun(httpx_get(make_url('www.baidu.com')))
        print(res.headers)
        # Headers([('bdpagetype', '1'), ('bdqid',...
        
        logger_level('info')
        
        res.encoding = 'UTF-8'
        save_tempfile(res.text)  # display res.text in the default browser
        
        ```
Keywords: machine translation,free,sign
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
