Skip to main content

Splice, Split and Modify URL

Project description

# SpliceURL
Splice, Split and Modify URL's python package

# Usage:

```
一、安装
#pip install SpliceURL

二、使用
"""
1、第一个参数必须是域名,domain=?;
2、第二个参数是域名协议,scheme=?,默认是http;
3、第三个参数是路径,path=?,默认是/;
4、第四个参数是参数,params=?,默认是None;
5、第五个参数是查询,query=?,默认是None,可传入字符串(如user=xxx&passwd=xxx)或字典(如{"user": "xxxx", "passwd": ""xxxx"});
6、第六个参数是段位,fragment=?,默认是None.

7、额外参数:
接收ip,port组合字典,拼接ip格式的url,port默认80.
Everything is ok, now run do().
"""

>>> s=SpliceURL.Splice(domain='saintic.com')
>>> s.do()
'http://saintic.com/'

>>> s=SpliceURL.Splice(ip="127.0.0.1").do()
'http://127.0.0.1/'

>>> SpliceURL.Splice(domain='saintic.com', query={"username": "tcw", "password": "xxx", "id": True}).do()
'http://saintic.com/?username=tcw&password=xxx&id=True'

>>> SpliceURL.Splice('saintic.com', "https", "api/blog", '', 'api=true&token=true', '20').do()
'https://saintic.com/api/blog?api=true&token=true#20'

可以参考demo.py
```

# ChangeLog
> v0.5
1. 增加domain+port形式URL。
2. 根据scheme设定默认port, http=80, https=443, 默认port不显示在URL中。

> v1.0
1. support python3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

SpliceURL-1.1.zip (6.5 kB view details)

Uploaded Source

SpliceURL-1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

SpliceURL-1.1-py2.7.egg (6.5 kB view details)

Uploaded Source

File details

Details for the file SpliceURL-1.1.zip.

File metadata

  • Download URL: SpliceURL-1.1.zip
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SpliceURL-1.1.zip
Algorithm Hash digest
SHA256 83642d626669b4c5ee618ce7c21978990970ba7f85cd541cff432d47bb93690f
MD5 a0161dafc50472c09d19c10576f0a3c0
BLAKE2b-256 40d5b4194669e4244d6d8f7ffbec4b8c30f977b1fab3c422f1a340c735dac117

See more details on using hashes here.

File details

Details for the file SpliceURL-1.1.tar.gz.

File metadata

  • Download URL: SpliceURL-1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SpliceURL-1.1.tar.gz
Algorithm Hash digest
SHA256 4314986dfbdc467edcce66ad3d1349a861a8bec022203d6d93e8baa3337d511f
MD5 1721a2ad2828c5e95c3905fee8da5b69
BLAKE2b-256 d8d34975ce53c0c9af4c634569aa534d451a260c79ff646d3cc464886c3f190d

See more details on using hashes here.

File details

Details for the file SpliceURL-1.1-py2.7.egg.

File metadata

  • Download URL: SpliceURL-1.1-py2.7.egg
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SpliceURL-1.1-py2.7.egg
Algorithm Hash digest
SHA256 065c55d5699625dad3eae54cf38b55e8351be7dce6d937ddc07af0152fd6d476
MD5 85fceba982d2930cb88a552a42b6fc36
BLAKE2b-256 0321c3aba8c3e4c4b8fbb4c10f46029a492137ea53fb631b5c2b490c9eefec72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page