Using openshift Rest Api in Django framework Python application - python

i want to strarted to build an application using framework Django in python to consume Openshift rest api that the user will be able to authentication and use their resources.
the objectif of this project is to provide a web-based platform to enable Openshift users to create or interact with their online resources using Openshift web api Rest 3.0 .
Specifications of project : The required service should enable existing projects and new projects management for any user having an Openshift online account. Management includes: -Authentication and Authorization -Teams , members and subscription plan management -SSH keys management -Gear, cartridge and application management -Deployment All these capabilities must be implemented using the Openshift API and provided using a Django based web interface.
i try to read the officiel documentation through URL:https://access.redhat.com/documentation/en-US/OpenShift_Online/2.0/html/REST_API_Guide/index.html
but i can't find a way to start building the application and consuming this rest api. have any one an idea to start

If you are writing a new application, I suggest using v3. The web console already has most of this functionality. The REST API reference should help you get started.

Related

Can we use flask-pyctuator to monitor Flask App with out using spring boot

I want to determine whether if python packages can be used to implement monitoring actuator /health endpoint . Our services are deployed on to Kubernetes and logs are logged in splunk and Kubernetes is monitores using splunk observability
If you are asking about using the actuator/health endpoint for k8s readiness-probe, or are you asking if there's an admin tool written in python that can monitor your application via the Pyctuator API.
Will try to answer both:
Pyctuator is adding APIs to your Flask app (and other popular frameworks). These APIs are providing many details about your application in a way that's compatible with Codecentric's "Spring Boot Admin". I'm not familiar with other admin-tools that can consume the actuator/pyctuator API. Also, Spring Boot Admin is great for monitoring Python services that use Pyctuator.
If you are looking for endpoint for k8s readiness probe, this can be cool if you have dependencies such as DB connection that you don't want your pod to be ready until the connection is up.

Creating a desktop Python app with Firebase, how do I include the private key?

I'm trying to build a desktop application that is built with python and pyqt5. I want to send it to users with their own login details, but I am not totally sure what to do with the private key. Up until now, I've had to do
export GOOGLE_APPLICATION_CREDENTIALS=[path to private key json]
or for windows
set GOOGLE_APPLICATION_CREDENTIALS=[path to private key json]
Obviously I don't want to give out the private key. Is it ok to store it in the program, or is there a special safe way to do that? I'm using pyinstaller to package everything.
The only SDK Firebase provides for use wit Python is a so-called Admin SDK. As the documentation on [setting up the Admin SDK] says:
The Admin SDK lets you interact with Firebase from privileged environments
So this SDK is not suitable for developing applications for your regular users, as the credentials it requires grant the user full administrative access to your Firebase project.
There is no official Firebase SDK for developing Python applications for regular clients, so your options are limited to:
Using the REST APIs for the various Firebase services, and writing your own client-side Python code against that.
Using a third-party API, such as Pyrebase that supports both client-side and administrative access.

Build API with ASP.NET Web API on Django project

We are currently building our event management platform at a company i work for, The authentication service is being built with ASP.NET identity framework.
The main event management platform is built in Django using python, which i have built.
We are also planning on building a custom admin portal in ASP.NET MVC,
which will manage users and event data.
The problem is that the C# guys(Who are contractors albeit very experienced developers) want to build out the API using ASP.NET for the event app which is built in django, using the Database first model that .NET provides, thus the database migrations will be handled by Django, but the actual API will be built using ASP.NETS Web API, directly from the database.
This approach does not seem to make much sense in my opinion as it would make a lot more sense to build out the the API using Django rest framework and manage the database migrations for the event app. Instead of tightly coupling the database with Web API.
Either way both approaches are are effectively doing the same thing, but i don't think it's efficient to constantly manage two environments, migrations in one environment and api management in the other, this does not allow for flexibility.
What are the potential disadvantages of the WEB API approach.

Password-protect hosted web app

I'm looking to password-protect a clone of the Google Analytics Embed API website hosted on appspot.com and built in Node.js and Python. The github project for which is here.
Appspot doesn't let you run PHP on Python-based sites so PHP isn't an option for password-protecting the site. Is there another way I can password protect a web project like this?
Simply change the app.yaml configuration file to require "login: admin" on all handlers, described here.

Python - Intranet Web Service

About to embark on a Java project using Spring Security to create a Restful Web Service (JSON) that will use Kerberos authentication to authenticate users in Active Directory.
I'm not locked into using Java and am considering the use of Python to gain new skills and look at potential alternative platforms.
So far I have looked at Twisted and Web2Py but they don't seem to have support for Kerberos nor could I find information around implementing Kerberos support.
Does anyone know of frameworks supporting the above deployment or pointers to get me started?
Python Eve is a restful api written in Python that uses mongo as its backend.
It provides a simple class that you can use to implement your own authentication which would allow you to use the python kerberos module
I use this setup but with ldap instead of kerb.
The underlying web framwork behind eve is Flask.

Categories