Skip to main content

wrap2: Library for wrapping social network wrappers

The wrap2 package is a wrapper for various social networks wrappers. Various networks have different format for “posts”. Twitter is chosen as standard, so other networks posts are converted to be twitter-like.

https://api.travis-ci.org/paylogic/wrap2.png https://pypip.in/v/wrap2/badge.png https://coveralls.io/repos/paylogic/wrap2/badge.png?branch=master

Installation

pip install wrap2

Usage

from wrap2 import fbook
fb = fbook.Facebook('id', 'secret')

# get authorization url on Facebook
url, opts = fb.get_authorization_url('http://example.com', scope=('read', 'write'))

# get access token and profile info
id, access_token, name, link = fb.on_authorization_callback(
    'http://facebook.com/some_callback_url', code='some code')

# Put a post on the wall of the user authorized by ``access_token``.
post = fb.post(access_token)


from wrap2 import twitter
tw = twitter.Twitter('id', 'secret')

# get authorization url on Twitter
url, opts = tw.get_authorization_url('http://example.com')

# get access token and profile info
id, (access_token_key, access_token_secret), name, link = tw.on_authorization_callback(
    'http://twitter.com/some_callback_url',
    oauth_verifier='some oauth verifier', request_token='some request token')

# Put an update status of the user authorized by ``access_token``.
post = tw.post(access_token)

Contact

If you have questions, bug reports, suggestions, etc. please create an issue on the GitHub project page.

License

This software is licensed under the MIT license

See License

© 2013 Paylogic International.

Changelog

0.9

  • Initial public release

Metadata

Release files for wrap2 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wrap2 0.9
File Size Uploaded
wrap2-0.9.tar.gz 6.7 kB Details

Release files / wrap2-0.9.tar.gz

Download URL wrap2-0.9.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e3340ec014308710c029a52ee26e613026fb548e7e07dd1c846e0108926df259
BLAKE2b-256 checksum
How to use checksums
0f67842d540cdcfb29290e6383d1c602343a636c9b904588f2b2000288be4b42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page