A cryptographic tool for specific fields in data [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I was thinking of building a piece of software that would be able to encrypt specific fields in a data file. So I started to consider writing some code in Python using cryptographic libraries. However I wonder: is it really safe? Should I rather use existing cryptographic tools?
If so, do you know a good cryptographic tool I could rely on? The only tools I find only encrypt entire files or disks. Thank you!

This greatly depends (obviously), on how you write it.
There are libraries like cryptography which already provide this solution though and are considered very safe.
https://github.com/fugue/credstash, for instance, which is widely used, uses cryptography.
https://github.com/lyft/confidant uses it also.
I implemented a locally usable secret store using cryptography (which you could use to encrypt any type of data) - https://github.com/nir0s/ghost which you could use as a reference implementation or simply use it (hope I'm not breaking any rules here)

Related

how to convert thrift TCompactProtocol to TBinaryProtocolTransport [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have a api made based on thrift TCompactProtocol.
Is there a quick way to convert it into TBinaryProtocolTransport?
Is there a tool for conversion?
FYI. My api is Line Api bases api Python.
There is no tool needed. Since yyou did not elaborate on your actual use case too much, I can only give a generic answer.
You control both RPC server & client + we do NOT talk about stored data
In that case you need only to replace the transports on both ends and you're pretty much done.
All other cases
You will need two pieces
a piece of code that deserializes old data stored with "compact"
a piece of code that deserializes these data using "binary"
Both cases are not really hard to implement technically.

Audio Manipulation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for a Python library that will allow me to record, manipulate, and merge audio files. Most of the ones I've seen don't support Windows and/or are outdated. Does anyone have any suggestions for libraries or how these functions could be implemented with the standard python library?
Recording and Manipulating are generally different problems. For both of these, I stick with .wav file formats since (at least in their simpler forms) they are basically just the raw data with a minimal header and are easy to work with.
Recording: I use pyaudio, which provides bindings to the portaudio library.
Manipulation: For simple things I use audioop which is included in the basics Python installation, and for more complex things I go straight to scipy (which can read in many .wav files with scipy.io.wavfile.read) and then manipulate the data like any other time-series data. scipy is powerful and fast, but doesn't offer many audio specific tools nor does it present things in an audio specific terminology.
There are other things out there, though less well established, such as Snack, Audiere, and AudioLazy, are tools I've heard of bet never used, and I don't know which are still available, or their level of development, etc.

Looking for example or documentation for wikidump python lib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I stumbled upon the wikidump python library, which I think suits me just fine.
I could get by by looking at the source code, but I'm new at python and I don't want to write BS code as the project I need it for is kind of important to me.
I got the 'wiki-SPECIFICDATE-pages-articles.xml.bz2' file and I would need to use that as my source for single article fetching. Can anyone give me some pointers as to properly achieve this or, even better, point at some documentation? I couldn't find any!
(p.s. if you got any better and properly doc'd lib, please tell me)
Not sure if I understand the question, but if you have the Wikipedia dump and you need to parse the wikicode, I would suggest mwparserfromhell lib.
Another powerful framework is Pywikibot, that is the historic framework for bot users on Wikipedia (thus, it has many scripts dedicated to writing pages, instead of reading and parsing articles). It has a lot of documentation (though, sometimes obsolete) and it uses MediaWiki API.
You can use them both, of course: PWB for fetching articles and mwparserfromhell for parsing.

Runtime Statistics in Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for a library for gathering "runtime statistics" in python, by which I mean an interface for outputting structured log files. A good example of what I would like is Twitter's ostrich project in Scala, wherein one simply executes a statement notifying the logger of an event. Ideally, this would then be automatically aggregated into a suitable visualization for application monitoring.
Does anyone know if such a library exists? Alternatively, does anyone know a more generic way of combining traditional message logging with some simply graphing for runtime analytics?
Thanks!
Graphite is one such system, written in Python.
I'm not familiar with ostrich, but a quick look at the readme suggests that the python project mmstats might be close to what you're looking for.

What is a good configuration file library for c thats not xml (preferably has python bindings)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a good config file library for c that is not xml. Optimally I would really like one that also has python bindings. The best option I have come up with is to use a JSON library in both c and python. What would you recommend, or what method of reading/writing configuration settings do you prefer?
YaML :)
If you're not married to Python, try Lua. It was originally designed for configuration.
You could use a pure python solution like ConfigObj and then simply use the CPython API to query for settings. This assumes that your application embeds Python. If it doesn't, and if you are shipping Python anyway, it might make sense to just embed it. Your C .exe won't get that much bigger if it's a dynamic link, and you will have all the flexibility of Python at your disposal.
Despite being hated by techies and disowned by Microsoft, INI files are actually quite popular with users, as they are easy to understand and edit. They are also very simple to write parsers for, should your libraries not already support them.

Categories