Download the PHP package astroway/sdk without Composer

On this page you can find all versions of the php package astroway/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

astroway/sdk

Official PHP SDK for the AstroWay API — natal charts, synastry, transits, Vedic dashas, Tarot, Numerology, Human Design, AI horoscopes. Type-safe, retry-aware, PSR-18 compatible.

Latest Version PHP version

700+ endpoints. Pure PSR-18 / PSR-17 — bring your own HTTP client (Guzzle, Symfony, Buzz, …) or let auto-discovery pick one. Built-in retry on 408/409/429/5xx with exponential backoff. Stainless-style error hierarchy (AuthenticationError / RateLimitError / BadRequestError / …). PHP 8.1+.


Install

The SDK requires a PSR-18 HTTP client. If you don't already have one, the simplest path is:

Already using Symfony's HTTP client, Buzz, or another PSR-18 implementation? php-http/discovery (a transitive dep of this SDK) auto-finds it. Or pass it explicitly:

Get an API key at https://api.astroway.info/dashboard/sign-up10 000 credits/month free, no card required. Each endpoint costs 5–500 credits depending on what it computes (pricing).


Quick start

The SDK exposes 103 typed service namespaces / 623 methods auto-generated from the OpenAPI spec — $aw->synastry()->aspectGrid([...]), $aw->bazi()->dayMaster([...]), $aw->vedic()->dashasVimshottariMaha([...]), etc. The { ok, data, error } envelope is unwrapped for you. Service objects are memoized per Astroway instance.

Need a raw response or an endpoint not yet covered by services? $aw->request('POST', $path, ['json' => $body]) and $aw->post($path, body: …) remain available as escape hatches.


Common workflows

Synastry

Transits to natal

Vedic Vimshottari Mahadasha

Tarot daily card

Human Design


Error handling

The SDK throws typed subclasses of Astroway\Errors\ApiError. Catch order matters — most specific first:

Full hierarchy under Astroway\Errors:

errorCode (not code) is the AstroWay-specific error code property. The base \Exception::$code would conflict.


Configuration

Default retry honors Retry-After (seconds or HTTP-date) on 429 responses.

Set retry: ['maxRetries' => 0] to disable retries entirely.


Authentication

Two equivalent auth schemes — pick whichever your stack prefers:

Set via 'authScheme' => 'bearer' in the constructor options.


Privacy

The SDK does not phone home. There is no telemetry, no analytics, no usage reporting. The only network traffic the SDK originates is the AstroWay API calls you ask it to make.

Outgoing requests carry two identifying headers so the AstroWay backend can distinguish SDK traffic from raw HTTP traffic in its own logs:

Neither carries a session ID, machine fingerprint, or anything personal.


Stability

Since 1.0.0 (2026-05-11) this package follows strict SemVer:

Migration from 0.1.0-alpha.x / 0.1.0-beta.x / 0.1.0-rc.1 to 0.1.0

0.1.0 freezes the public surface. No breaking changes vs 0.1.0-rc.1 — every export, namespace, error class, and option added across alphas / betas / RC ships unchanged. The freeze means future 0.1.x patches will not narrow types, remove classes, or rename methods; that level of change requires a 0.2.0 minor bump.

Coming from Action
0.1.0-alpha.1 (hard Guzzle dependency) Now PSR-18 — bring your own client ('httpClient' => $client) or rely on auto-discovery via php-http/discovery.
0.1.0-alpha.2alpha.4 (no service classes / DTOs) Switch to typed services ($aw->chart()->compute($body), etc.) and DTO classes (new NatalChartRequest(...)). The escape hatch ($aw->post('/chart', $body)) still works.
0.1.0-alpha.5alpha.6 (no error refinement / idempotency) Catch RateLimitException / QuotaExceededException separately; $exception->requestId / creditsRemaining / retryAfterSeconds available. Auto Idempotency-Key on POSTs.
0.1.0-beta.1beta.3 (no helpers / cache / concurrent) BirthDateTime::fromCity(...) helpers; PSR-16 cache via 'cache' => $cache; $aw->concurrent(10)->all([...]) for parallel batches.
0.1.0-beta.4 (no mock client) use Astroway\Testing\MockAstroway; for PHPUnit — drop-in for Astroway.
0.1.0-rc.1 (no logger / metrics) Optional: pass 'logger' => $monolog and 'metrics' => fn($e) => ... for PSR-3 + observability.

A surface-lock test suite (tests/SurfaceLockTest.php) uses Reflection to assert public method signatures, error subclass tree, and namespace accessor presence — any future PR that breaks the public surface fails CI before reaching Packagist. phpstan analyse is also clean at level 6.


Links


License

MIT — see LICENSE.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/http-client Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/http-factory Version ^1.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
psr/log Version ^1.1 || ^2.0 || ^3.0
php-http/discovery Version ^1.19
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package astroway/sdk contains the following files

Loading the files please wait ...