Giter Club home page Giter Club logo

ecx-api-pagination-python's Introduction

Paginate the eCX API

Version 1.0.0

A simple Python example using the Requests module to interact with the eCX API to query for the latest phish data. Because the eCX API uses the HAL+JSON spec in the output users are able to iterate through pages of results matching their query parameters.

CSV Output

By default eCX outputs all data in JSON using the HAL+JSON spec, which allows consumers of the data to control all pagination thoughout the result set.

However, the eCX API fully supports CSV output using the container parameter set to csv.

Example:

https://api.ecrimex.net/phish?container=csv

Note that the default JSON object contains nested key value pairs that will not flatten into CSV, so the only values returned when CSV is desired are: id, brand, date_discovered, URL, confidence_level, and modified.

This example goes a little further with CSV output, and does not use the container=csv parameter, instead it demonstrates how to use Python to convert the output to csv on the fly. Note that there will be data loss in the arrays containing possible multiple values

Developed By...

Alan Fajardo for the APWG, [email protected]

ecx-api-pagination-python's People

Contributors

mikedambrogia avatar balkath avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.