Tag: API

Do not use roles in your API, use this instead

Why should you ever use built-in role-based authorization in your API? [HttpGet("get_something")] [Authorize(Role = "admin, admins_cat")] [Authorize(Role = "hacker")] public Task<IActionResult> GetSomething() Okay, it looks nice and works well, but in t...

10 REST API BEST PRACTICES

1. Use descriptive and meaningful resource names- Instead of generic or ambiguous names, choose resource names that accurately represent the entities they represent. 2. Use HTTP methods correctly- Use the appropriate HTTP methods (GET, POST, PUT, DELE...

Understanding Kubernetes API Server — A Beginner’s Guide

Kubernetes, the popular container orchestration platform, relies on a client/server architecture known as the API Server. In this blog post, we will take a closer look at the Kubernetes API Server, its key concepts, and how to interact with it effectively. Check out “Understanding Kube...

Effective State Management with Context API in React

State management is a crucial aspect of building modern web applications, and React provides various tools to help developers manage state efficiently. One such tool is the Context API, a built-in solution that simplifies the process of sharing state across components. In this article, we'll div...

Web Storage API: A Developer’s Guide to Browser Data Storage

When we see HTML, we see a bunch of tags, elements, and lots of angle brackets but HTML is much more than these things. In recent years of web development, it has emerged as a cornerstone for creating interactive and dynamic web applications. At the root of this innovation lie HTML5 APIs, which prov...

3 ways to make an API call in React

React JS is a JavaScript library for building single-page applications. It has become popular for building both single-page applications (SPAs) and mobile applications. In this blog, we will delve into all the methods for making API calls within React. An API call in React refers to making a requ...

Why I Use RTK Query for API Calls in React

The RTK Query part of the Redux Essentials tutorial is phenomenal, but since it’s part of a much larger suite of documentation, I feel like the gem that is RTK Query is getting lost. Photo by Hal Gatewood on Unsplash What is Redux A lot of people think of ...

When to Use Context API vs Redux in Your Next React Project

If someone would ask me, what’s the most important piece of any website? My answer will always be the same. It’s the state management. After all, it’s the state that is deciding what users will see. Effective state management is a critical aspect of building robu...

Continuous Performance Improvement of HTTP API

In my previous post, I detailed a few code tricks to improve backend performance. How did I know where to focus and what to optimize, though? Indeed, joining Cython and other low-level gizmos to the party should have solid reasoning. I work at Athenian. Athenian offers a SaaS that helps...

Top 10 Websites To Help You Program CSS in 2023

Css is a language whose task is to design web pages, but getting to the best possible form requires a lot of time, experiences and software lines, but don’t worry there are a lot of tools in place to facilitate the process of writing css. In this article I will tell you 10 free tools and sites...

REST API vs. GraphQL: Unraveling the Web of APIs

In the vast landscape of web development, two superheroes have emerged to battle it out for the crown of API supremacy: REST and GraphQL.  But fear not, fellow developers, for in this blog, we’ll break down the battle between these two contenders and help you decide which one suits your n...

Spring Boot REST API Full Tutorial

This is a complete tutorial of building a REST api with Spring Boot with. You will learn how to : Create REST APIs Add spring security with jwt authentication & authorization Work with database Add database migration with flyway The source code of this tutorial is published in g...

Building Microservices with FastAPI — Part I — Introduction to the FastAPI Framework

Without a doubt, microservices are one of the hot topics of modern IT landscape. Their popularity enhanced with the prevalence of cloud technologies and containerization of applications. Therefore, transformation of legacy monolith applications to this architecture and architecting new projects as s...

Harnessing Flight Data: A Comprehensive Guide to Filtering with the AviationStack API

Air travel is a dynamic and rapidly changing industry. With thousands of flights taking off and landing daily, businesses, travelers, and aviation enthusiasts need real-time data to make informed decisions. The AviationStack API provides such data, and in this guide, we’ll delve into the myria...

Create your very own API using python

An API (Application Programming Interface) is a set of code that allows two software programs to communicate with each other. APIs are a critical component of web development and programming. They provide a way for different applications and systems to communicate with each other, exchanging data an...

ChatGPT Clone With Streamlit And LangChain

I have recently been working with streamlit and got this idea, “What If I build a streamlit application with LangChain to make a clone of ChatGPT?”. I took on the challenge and did it! In this article, I’ll go ahead and explain to you how I was able to do just that. In previous ...

Simple & secure direct-to-S3 uploads from modern browsers

The problem of providing users with a way to upload files to an S3 bucket is something you run into in every project. However, identifying the right JavaScript components and configuration and making it all work together to accomplish this task feels like black magic. The AWS documentation would ...

Through the Ages: Apple Animation APIs

I recently stumbled upon John Siracusa’s legendary Mac OS X reviews for the first time. If you’re not in the loop, these were astonishingly detailed technical reviews of Apple’s major Mac OS X releases between 1999 and 2014. According to Ars Technica, where these were publi...

Mastering Minimal APIs: Implementing Layered Architecture and Repository Pattern in .NET7

Hello, today we are set to make significant changes to our API design. We plan to revamp it using a layered architecture and the repository pattern. To start, we’ll establish business, entity, and repository layers. Following that, we’ll relocate our existing classes and methods into the...

5 Important Microservices Design Patterns

Microservices design patterns have become increasingly popular due to their ability to improve software agility, scalability, resilience, and maintainability. Microservices design patterns are a set of principles and best practices used to develop and maintain software systems that ar...

Introduction to Python API Building

Python is a powerful programming language with many applications. In this post we will explore its ability to build REST APIs. We will leverage the FastAPI, Pydantic, and SQLAlchemy python libraries, along with Postgres to build a REST API that can support a simple TODO list application. By the end ...

What I’ve Built After 7 Years Coding a Smart Home

I’ve been working on KAREN (a Spongebob Squarepants reference for the uncultured) for a while now, but I’ve never documented what she actually looks like or how I’ve built her. If you are thinking of having a crack at building your own, I hope this series can be of some help. I&...

How to migrate Angular CoreModule to standalone APIs

In this article we’re going to learn how to migrate commonly used Angular CoreModule (or any other Angular module) to standalone APIs! Angular standalone components and APIs are the future! Angular CLI now allows us to generate new Angular applications with standalone setup out of...

How I made an Open-Source AI Hedge Fund

In this post I explain how I created an artificial intelligence that makes automated trades for me daily. With modern advancements in machine learning and easy access to data online, it’s never been easier to get involved in quantitative trading. To make things even better, cloud tools like...

How to use Gen AI for Social Media Marketing with PaLM API and Maker Suite

Generative Artificial Intelligence allows us to generate new creative content in text, code, images, etc. This time, we are going to create a web application that allows us to create marketing content. To do this, we will use the following tools: PaLM API: It is the interface that Google pr...

Every Token Counts: The Art of (Dynamic) OpenAI API Cost Optimization

Have you started developing with OpenAI and found yourself wondering about the costs? If so, you’re in good company. In this guide, we’ll explore: Estimating Token Usage: How to determine token usage before making an API call. Predicting Costs: How to forecast the costs based on ...

Uncorking Insights: A Data-Driven Journey Through the World of Wine

Wine, a beverage steeped in tradition and culture, has captivated connoisseurs and novices alike for centuries. Beyond the art of sipping and savoring, the world of wine is a complex tapestry of flavors, vineyards, regions, and, of course, ratings. But what if we told you that you could dive deeper ...

Euro Trip Optimization: Genetic Algorithms and Google Maps API Solve the Traveling Salesman Problem

Remember that feeling after watching movies like EuroTrip, where the characters whisk through picturesque European cities on an adventure of a lifetime? It’s captivating. Yet, reality promptly reminds us: that orchestrating a journey across numerous destinations is no simple task. But her...

Querying calendar events via the Google Calendar API

Do you want to pull all meetings & events from your or any shared Google calendar via the Google calendar API in Python? This blogpost provides step-for-step instructions on how to setup authentication, request calendar events and handle the pagination token. For th...

Create your own Generative AI Text-to-Image API

The TL;DR Recent advances in Generative AI have led to the launch of a whole host of services such as DALL-E 2, Midjourney and Stability AI that have the potential to drastically change the way we approach content creation. In this post I show you how to build and serve your very own, high p...

ComfyUI : Using the API : Part 2

One particular use case I have after training a model with various saved checkpoints is to produce test images from each one with different prompts, and different image aspect ratios and perhaps different other settings. The only way to do this via the main UI was through a lot of clicking around....

Serverless API Idempotency with AWS Lambda Powertools and CDK

It happened to all of us. You order a shiny new tech gadget or a pair of new jeans online. The order takes its time and then fails due to momentary network failure. So you submit it again, and the order goes through this time; success! However, two weeks later, you realize your credit card was...

Optimizing Amazon API Gateway use: Strategies for Effective Usage Plans

Quotas and why do you need them? API quotas are restrictions placed on the maximum number of requests that can be made to an API in a specific time period, typically a day or a month. Some restrictions have been put in place to ensure that the API is used fairly by all users and to prevent ser...

AWS API Gateway and S3 Integration (encouraging the correct way)

Amazon S3 Amazon Simple Storage Service (Amazon S3), often referred S3, is a highly scalable, secure, and flexible cloud storage service provided by Amazon Web Services (AWS). It was introduced in March 2006 and has since become one of the most widely used object storage services in the world. ...

Discovering the Synergy Between AWS Lambda and API Gateway

The world of cloud computing is vast, but among its vast array of services, AWS Lambda and API Gateway stand out, especially when you harness them together. Here’s a more detailed look into these game-changing services. AWS Lambda: More Than Just Function Execution The Heartbeat of S...

How to Execute a REST API Call on Apache Spark the Right Way

Introduction This article uses Python for its examples. For those of you looking for a Scala solution, the theory and approach are completely applicable; check out my Github repo for the Scala source code https://github.com/jamesshocking/Spark-REST-API-UDF-Scala. Setting the Scene Apac...

Exploring SQL Statement Execution with Databricks REST API

During the past week, there was a need to explore the execution of SQL statements on Databricks through the API to facilitate data consumption from our Lakehouse in company applications. This exploration involved a thorough examination of Databricks documentation and the subsequent summarization of ...

4 methods to execute any REST API including Databricks REST API

Below four methods can be used to execute/call any REST API including Databricks REST API. In this blog, we have provided examples of Databricks API but the same can be implemented for any other REST API. curl requests Python requests Using Postman application Using&n...

Build a Data Lakehouse with DataBricks and the Strava API

A data lakehouse is an advantageous way to store data as it utilizes modern principles of cloud architecture. This allows for decoupling of storage and compute along with the ability to handle both structured and unstructured data. This blog will detail how to effectively build a lakehouse with d...

How To Call REST API & Store Data in Databricks

This article will go through the concepts of REST API and how to call it using Databricks. We will also learn to process JSON structures received from REST service and store data in Databricks (delta tables). Photo by Ferenc Almasi on Unsplash Databricks Databricks is a p...

Using Nginx as an API Gateway

In this article, we will utilize Nginx as the API gateway to manage and direct incoming requests to three different microservices. The primary role of the API gateway (Nginx) is to act as an intermediary between clients (e.g., web or mobile applications) and these microservices. Instead of the clien...

API Service with FastAPI + AWS Lambda + API Gateway and Make It Work

The goal of this article is to show one way to create a FastAPI app, deploy it to AWS Lambda via a Docker Container, trigger it with API Gateway, and basically just make it work. Combined together, the FastAPI + AWS Lambda + API Gateway setup allows one to quickly spin up a maintainable and scalable...

Saying Goodbye to Ingress: Embracing the Future of Kubernetes Traffic Management with Gateway API and Cilium

In the dynamic world of Kubernetes, managing ingress traffic efficiently and securely has always been a crucial challenge. However, a groundbreaking solution has emerged, promising to transform the way we handle traffic routing within Kubernetes clusters. Meet the Gateway API: a long-term re...

Multi-cluster management for Kubernetes with Cluster API and Argo CD

Customers are moving to cloud thanks to its scalability and cost-effectiveness. Some are adopting Kubernetes to modernize their workloads for a more agile way to iterate and deliver time-to-market services or product features to their customers. As the number of clusters to be managed increases, cus...

Hide your API Keys in Android

You are using a version control system and your project uses some services that require API keys. Everything is all good and well when it is on your local machine, but you obviously don’t want to share these API keys with the world. How can we still preserve our API keys within our applic...

Best Way To Handle Api Request Swift

Hi, for a couple of days, I’ve been looking for an ultimate solution for API Consuming Single Function that can make all the requests, and also we can provide any data type as body data and response. And the most amazing thing is you don’t need any packages for that Let me show you how ...

A Simpler Inter Process Communication API with inotifywait

As it goes on a *nix system, everything is a file. It summarizes the notion that a lot of information in *nix systems is represented as a file somewhere on the filesystem. /proc is probably the most famous of these, but there are other places of interest around if you look for them. Couple t...

Flutter Thursday 13: Building a User Registration and Login Process with provider and external API

This episode will build a user registration and authentication system that will interface with a backend system. It will cover the following flows: registration, login, auto-login, and logout. We will use the provider package to maintain state and the backend will be a Phoenix application ...

Revolutionizing Embedded Finance: Navigating the AI-Powered API Economy

Unleashing the Power of APIs in the Modern Internet Application Programming Interfaces (APIs) emerge as the unsung heroes powering the contemporary internet. From the functionality of websites and mobile apps to the intricacies of IoT devices, APIs serve as the backbone. In the era of global inte...

Scraping real estate listing data using ChatGPT’s API

I worked for a real estate fund for quite a while, and was always interested in the Market, therefore I was always looking to find a way to understand it, to get the big picture, and how to value a property correctly. In order to do that I used to scrape the data of my city and followed the followin...

SECURE Act 2.0 Startup Opportunity & Finch’s Universal Employment API

A year ago, Congress passed the SECURE Act 2.0, expanding the Setting Every Community Up for Retirement Enhancement (SECURE) Act of 2019, and further strengthening the retirement system throughout America. The SECURE Act 2.0 adds new provisions designed to make it easier for Americans, both who...

Shipping API Shopify

Shipping API for Shopify is a powerful tool that enables merchants to automate shipping processes and create customized shipping experiences. The API provides access to many features, such as real-time rates, labels and tracking information, address verification, multi-carrier support, international...

Starlinks API Integration Platform

In today’s digital world, more and more businesses are moving towards API-based architectures. This allows for a more connected and streamlined customer experience and easier integration with other systems. The Starlinks API Integration Platform is one of the leading platforms in this area, pr...

Dhl API Integration

The DHL API is a powerful tool that enables businesses to manage their shipping operations more efficiently. It allows them to access the full range of DHL services, including label-printing, tracking, and delivery notifications. It also provides real-time rate quotes from over 2000 carriers worldwi...

Automate Biological Laboratory Workflows Using a Liquid Handling Robot (with Opentrons Python API)

Liquid handling robots are highly efficient laboratory automation tools that can perform various sample preparation tasks that are repetitive and time-consuming. They provide numerous benefits such as cost savings, increased accuracy, and improved efficiency. Additionally, they are highly advantageo...

How to Get Real-time Flood Data from the USGS API

The US Geological Survey (USGS) is an agency of thousands of scientists that track the landscape, natural resources, and natural hazards of the United States. From earthquakes to landslides to wildland fires, the USGS has all sorts of computers, sensors, and surveying tools that ...