my problem is the following one: I would want to list all the projects which are present on a RhodeCode instance through Python package. However, I do not find the necessary information within the documentation. Is it someone would have a solution?
RhodeCode has a JSON-RPC api. You can use python requests lib to fetch all list of projects, read the JSON and then iterate over the results.
The JSON api call to make is get_repos. Check out RhodeCode docs on the API topic, and how to call it. Also if you need more detailed example how to call the API, look at the open-source CLI script here (all in Python):
https://code.rhodecode.com/rhodecode-tools-ce/files/dc1eb60fcd9cadb8be52a56d56d561d731e09d0b/rhodecode_tools/lib/api.py#L218
Related
As part of our CI/CD we want to add some check to run code on python files and check if there are some secrets in code (like API, passwords etc.).
I saw only programs that do this, and I want to create a Python script that does it.
Does anyone have some suggestion or example for this?
I'm not sure it exactly what you look for but you can use GitGuardian API,
The GitGuardian API puts at your fingertips the power to detect more
than 200 types of secrets in any text content, as well as other
potential security vulnerabilities.
py-gitguardian can be used to create integrations to scan various data
sources, from your workstation's filesystem to your favorite chat
application.
You can check API details here with all the response codes and expected structures on each method.
just take a look GitGuardian/py-gitguardian Github repository,
You can also check this Youtube video that will help you implement this.
Good luck.
Can anyone find an exampple of the API for Airtable.com being used in python.
There is documentation but I'm not sure how to get started.
Note, they don't have a client library.
There is one project on github:
https://github.com/nicocanali/airtable-python
Airtable Python
Python interface to the Airtable's REST API - https://airtable.com
I made one similar to the original one by nicocanali but organized slightly different: https://github.com/gtalarico/airtable-python-wrapper
I'm looking for a python wrapper for current Twitter API just to perform simple searches, but the wrappers I've tried (twython, python-twitter, etc.) are all outdated, and cannot perform search with under current Twitter.
Is there a python wrapper that is updated to work with current twitter?
If you need only searches — take one of the python's OAuth libs (this one for example), and make calls yourself. For small subset of requests it would be faster solution then searching and evaluating different libraries.
I used
http://pypi.python.org/pypi/python-twitter/
about a year or two ago and it's still in the same version 0.8.2. It served well for all I needed at that point - just posting tweets. If you're about to do something simple, it may suffice.
I figured, to perform a simple search,
it's better not to go through all the wrappers...
You can simply use http GET search as follows:
import urllib2
parent = urllib2.urlopen("https://api.twitter.com/1/statuses/show.json?id=291095878196920320&include_entities=true").read()
you can of course write it to file, etc.
I want to integrate Zanox feeds in a Django project. Unfortunately there seem to be no client library implementations in Python.
Or are there?
What is the next best alternative to a Python library? Using the Ruby version?
Would have been useful to say what Zanox was in your question. For those interested, they appear to be an advertising network.
Anyway, they do seem to expose a pretty simple XML or JSON feed, as documented here. It looks pretty simple to get that using urllib2 or requests and parse it using json.load.
You can use https://pypi.python.org/pypi/python-zanox-api/ in a custom management command.
I'm trying to develop some scripts for iTunes in python and actually i'm having quite a hard time getting the API information.
I'm using the win32com.client module but i would really need to get all the specifications, methods and details.
There are a few examples but I need some extra data......
thanks!!!
iTunes com interface documentation is available at http://developer.apple.com/sdk/itunescomsdk.html
I know it has been a long time since this question was asked. But I find out some resource for later reference.
REST API:
https://developer.apple.com/documentation/appstoreconnectapi/
Python Wrapper:
https://pypi.org/project/appstoreconnect
Run dir(my_com_client) to get a list of available methods.
Here's a Python library to access iTunes API: http://pypi.python.org/pypi/python-itunes/1.0