GithubHelp home page GithubHelp logo

flyakite / actor-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apify/actor-templates

0.0 0.0 0.0 9.97 MB

This project is the home of Apify actor template projects to help users quickly get started.

Home Page: https://apify.com/

JavaScript 27.83% Python 22.30% TypeScript 18.32% Dockerfile 30.03% Mustache 1.52%

actor-templates's Introduction

Apify Actor templates

This repository stores boilerplate templates and code examples for Apify Actor. The purpose of these templates is to help devlopers get started with actor development on the Apify platform.

How to use the templates

You can start using the actor templates right away with the Apify CLI:

npx apify-cli create my-crawler

or

npm -g install apify-cli
apify create my-actor

After running the command you will be prompted to select one of the templates from the list displayed in your terminal. The available templates are:

Getting started templates

Basic templates to start developing actors on the Apify platform using Node.js (JavaScript/Typescript), or Python. Just install the CLI and watch your actor run.

You can find more code examples in the Apify SDK documentation.

Project boilerplate

If you're already familiar with actors, you can use the following templates to bootstrap new projects using an empty project template or Crawlee templates:

To run the template:

cd my-actor
apify run

Templates API

The template manifest can be fetched programmatically. Apify CLI uses this to always fetch the most up to date templates.

npm i @apify/actor-templates
const templates = require("@apify/actor-templates");

const manifest = await templates.fetchManifest();

Publish updated/new template

All templates are stores in ./templates directory. For each template needs to create an archive of whole source code into the ./dist/templates directory. The archive is used to to create a boilerplate template in apify CLI or other places in the Apify system.

Update and add templates

If you want to change a template, you will have to update the template files and the manifest.json file before pushing the changes to the master branch. After pushing to master, the archive will be automatically built using Github actions.

How to propagate templates into Apify CLI

Templates are propagated to Apify CLI templates. You can then find your newly added template when using the apify create command. The propagation happens after committing a new version of the template into the master branch. After tests succeeded the Github action builds archives of each template and pushes these archives into the repository. The CLI command then uses those archives to bootstrap your project folder. We did it this way because we can update template structure/code without publishing any package to npm. It makes templates changes agile.

Reference

Contributing

If you have any ideas for improvements, either submit an issue or create a pull request. For contribution guidelines and the code of conduct, see CONTRIBUTING.md.

actor-templates's People

Contributors

actions-user avatar mnmkng avatar drobnikj avatar fnesveda avatar dependabot-preview[bot] avatar pervillalva avatar b4nan avatar jbartadev avatar petrpatek avatar barjin avatar mtrunkat avatar metalwarrior665 avatar m-murasovs avatar mvolfik avatar vladfrangu avatar valekjo avatar novotnyj avatar andreybykov avatar github-actions[bot] avatar honzaturon avatar gippy avatar katacek avatar mhamas avatar patriktrefil avatar cybairfly avatar dependabot[bot] 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.