4WritersAPI
Описание
4WritersAPI — это API для взаимодействия с сайтом 4writers.net. Этот инструмент позволяет автоматизировать работу с сайтом, включая авторизацию и получение доступных заказов.
Функционал
-
Авторизация
- Выполняется с использованием логина и пароля.
- Сохраняет сессию для выполнения последующих запросов.
-
Получение заказов
- API парсит доступные заказы с сайта и возвращает их в структурированном виде.
- Поддерживаемая информация:
- ID заказа.
- Название.
- Тема.
- Дедлайн.
- Время до выполнения.
- Тип работы.
- Уровень академической сложности.
- Стиль оформления.
- Язык.
- Количество страниц.
- Количество источников.
- Оплата (зарплата, бонус, общая сумма).
Установка
- Убедитесь, что у вас установлен Python 3.8 или выше.
- Склонируйте репозиторий:
git clone https://github.com/your-repo/4writersAPI.git cd 4writersAPI
Установите зависимости:
pip install -r requirements.txt
Настройка
Создайте файл .env в корне проекта и добавьте ваши учетные данные:
LOGIN=your_login
PASSWORD=your_password
Использование
Пример использования API для авторизации и получения заказов:
import asyncio
from src.api.api import API
from envparse import env
# Загрузка данных из .env файла
env.read_envfile(".env")
LOGIN = env.str("LOGIN")
PASSWORD = env.str("PASSWORD")
# Инициализация API
api = API(login=LOGIN, password=PASSWORD)
async def main():
# Авторизация
await api.login()
# Получение заказов
orders = await api.get_orders()
if not orders:
print("No orders found.")
else:
for order in orders:
print("=" * 40)
print(f"Order ID: {order.order_id}")
print(f"Title: {order.title}")
print(f"Subject: {order.subject}")
print(f"Deadline: {order.deadline}")
print(f"Remaining: {order.remaining}")
print(f"Order Type: {order.order_type}")
print(f"Academic Level: {order.academic_level}")
print(f"Style: {order.style}")
print(f"Language: {order.language}")
print(f"Pages: {order.pages}")
print(f"Sources: {order.sources}")
print(f"Salary: ${order.salary:.2f}")
print(f"Bonus: ${order.bonus:.2f}")
print(f"Total: ${order.total:.2f}")
print("=" * 40)
asyncio.run(main())
Metadata
Release files for fourwritersapi 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fourwritersapi-0.5.2.tar.gz | 6.6 kB | Without provenance | Details for fourwritersapi-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fourwritersapi-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for fourwritersapi-0.5.2-py3-none-any.whl |
Total release size: 15.8 kB
Release files / fourwritersapi-0.5.2.tar.gz
| Download URL | fourwritersapi-0.5.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d23298a88d650aef98385ed4b6bc26b6787497d78c497e978069d0f19787ad3
|
|
BLAKE2b-256 checksum How to use checksums |
c54d12a1e1b94e13699e76be13e52500f359a12c852dc5d488c033f68db898ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Release files / fourwritersapi-0.5.2-py3-none-any.whl
| Download URL | fourwritersapi-0.5.2-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d44c2ecc5fb7efb05fd206f5e83557c5e81040fc9f44c76af329fefd8651e647
|
|
BLAKE2b-256 checksum How to use checksums |
140c51a236ea4a64c6541c04966d5edc103e3b89a045645ead32bdbd5dbe24b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Security for fourwritersapi 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.